Can restore state on rotate personal dict screen

When adding/editing a word for your personal dictionary
rotating the screen could cause the language to change
back to the device default. This has been fixed.

Test: ag/1389633, robolectric not supported in this branch.
Bug: 30874931
Change-Id: I0c8ebec5f4d5e7b23112b656c482c3b2cda7791f
This commit is contained in:
Salvador Martinez
2016-08-17 11:53:14 -07:00
parent 43344c83af
commit 8f4eb4d74b

View File

@@ -87,7 +87,7 @@ public class UserDictionaryAddWordContents {
mMode = MODE_EDIT; mMode = MODE_EDIT;
mOldWord = oldInstanceToBeEdited.mSavedWord; mOldWord = oldInstanceToBeEdited.mSavedWord;
mOldShortcut = oldInstanceToBeEdited.mSavedShortcut; mOldShortcut = oldInstanceToBeEdited.mSavedShortcut;
updateLocale(mLocale); updateLocale(oldInstanceToBeEdited.getCurrentUserDictionaryLocale());
} }
// locale may be null, this means default locale // locale may be null, this means default locale