Merge "Fix a problem where settings were not renewed correctly."

main
Jean Chalard 2013-07-31 07:17:48 +00:00 committed by Android (Google) Code Review
commit 561c447404
1 changed files with 5 additions and 2 deletions

View File

@ -714,7 +714,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
super.onStartInputView(editorInfo, restarting); super.onStartInputView(editorInfo, restarting);
final KeyboardSwitcher switcher = mKeyboardSwitcher; final KeyboardSwitcher switcher = mKeyboardSwitcher;
final MainKeyboardView mainKeyboardView = switcher.getMainKeyboardView(); final MainKeyboardView mainKeyboardView = switcher.getMainKeyboardView();
final SettingsValues currentSettingsValues = mSettings.getCurrent(); // If we are starting input in a different text field from before, we'll have to reload
// settings, so currentSettingsValues can't be final.
SettingsValues currentSettingsValues = mSettings.getCurrent();
if (editorInfo == null) { if (editorInfo == null) {
Log.e(TAG, "Null EditorInfo in onStartInputView()"); Log.e(TAG, "Null EditorInfo in onStartInputView()");
@ -808,7 +810,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (isDifferentTextField) { if (isDifferentTextField) {
mainKeyboardView.closing(); mainKeyboardView.closing();
loadSettings(); loadSettings();
// TODO: Need to update currentSettingsValues after loadSettings() currentSettingsValues = mSettings.getCurrent();
if (mSuggest != null && currentSettingsValues.mCorrectionEnabled) { if (mSuggest != null && currentSettingsValues.mCorrectionEnabled) {
mSuggest.setAutoCorrectionThreshold(currentSettingsValues.mAutoCorrectionThreshold); mSuggest.setAutoCorrectionThreshold(currentSettingsValues.mAutoCorrectionThreshold);
} }