diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index cc8dfebe2..36c77efaf 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -464,7 +464,8 @@ public class LatinIME extends InputMethodService @Override public void onConfigurationChanged(Configuration conf) { mSubtypeSwitcher.onConfigurationChanged(conf); - onKeyboardLanguageChanged(); + if (mSubtypeSwitcher.isKeyboardMode()) + onKeyboardLanguageChanged(); updateAutoTextEnabled(); // If orientation changed while predicting, commit the change @@ -489,8 +490,7 @@ public class LatinIME extends InputMethodService @Override public View onCreateInputView() { - mKeyboardSwitcher.loadKeyboardView(); - return mKeyboardSwitcher.getInputView(); + return mKeyboardSwitcher.onCreateInputView(); } @Override @@ -524,7 +524,7 @@ public class LatinIME extends InputMethodService return; } - SubtypeSwitcher.getInstance().updateParametersOnStartInputView(); + mSubtypeSwitcher.updateParametersOnStartInputView(); if (mRefreshKeyboardRequired) { mRefreshKeyboardRequired = false; @@ -614,9 +614,12 @@ public class LatinIME extends InputMethodService mJustAddedAutoSpace = false; loadSettings(attribute); - switcher.loadKeyboard(mode, attribute.imeOptions, mVoiceConnector.isVoiceButtonEnabled(), - mVoiceConnector.isVoiceButtonOnPrimary()); - switcher.updateShiftState(); + if (mSubtypeSwitcher.isKeyboardMode()) { + switcher.loadKeyboard(mode, attribute.imeOptions, + mVoiceConnector.isVoiceButtonEnabled(), + mVoiceConnector.isVoiceButtonOnPrimary()); + switcher.updateShiftState(); + } setCandidatesViewShownInternal(isCandidateStripVisible(), false /* needsInputViewShown */ ); @@ -641,7 +644,7 @@ public class LatinIME extends InputMethodService } private void checkReCorrectionOnStart() { - if (mReCorrectionEnabled && isPredictionOn()) { + if (mReCorrectionEnabled && isSuggestionShown() && isPredictionOn()) { // First get the cursor position. This is required by setOldSuggestions(), so that // it can pass the correct range to setComposingRegion(). At this point, we don't // have valid values for mLastSelectionStart/Stop because onUpdateSelection() has @@ -745,7 +748,7 @@ public class LatinIME extends InputMethodService mLastSelectionStart = newSelStart; mLastSelectionEnd = newSelEnd; - if (mReCorrectionEnabled) { + if (mReCorrectionEnabled && isSuggestionShown()) { // Don't look for corrections if the keyboard is not visible if (mKeyboardSwitcher.isInputViewShown()) { // Check if we should go in or out of correction mode. |