diff options
| author | Ken Wakasa <kwakasa@google.com> | 2012-11-08 06:22:02 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-11-08 06:22:02 -0800 |
| commit | 43f579e9f69fa8a55c6e65d3d78206094f0c9fe5 (patch) | |
| tree | 77159f69ff72b4c504088d607bea7e5038b44b67 /java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java | |
| parent | 5b1037fa94a3f4a64fe0f5aed58662d2e40af5d2 (diff) | |
| parent | 4eef51016adc4e103fa65d944a0ab31527ddced8 (diff) | |
am 4eef5101: am aa5d6fe0: am 9cc22c45: am 5d2556b9: Reset the IME if requested by the app.
* commit '4eef51016adc4e103fa65d944a0ab31527ddced8':
Reset the IME if requested by the app.
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java index 5f67ae05f..2e4a0eeff 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java @@ -253,6 +253,22 @@ public final class KeyboardState { } } + // TODO: Remove this method. Come up with a more comprehensive way to reset the keyboard layout + // when a keyboard layout set doesn't get reloaded in LatinIME.onStartInputViewInternal(). + private void resetKeyboardStateToAlphabet() { + if (DEBUG_ACTION) { + Log.d(TAG, "resetKeyboardStateToAlphabet: " + this); + } + if (mIsAlphabetMode) return; + + mPrevSymbolsKeyboardWasShifted = mIsSymbolShifted; + setAlphabetKeyboard(); + if (mPrevMainKeyboardWasShiftLocked) { + setShiftLocked(true); + } + mPrevMainKeyboardWasShiftLocked = false; + } + private void toggleShiftInSymbols() { if (mIsSymbolShifted) { setSymbolsKeyboard(); @@ -379,6 +395,15 @@ public final class KeyboardState { updateAlphabetShiftState(autoCaps); } + // TODO: Remove this method. Come up with a more comprehensive way to reset the keyboard layout + // when a keyboard layout set doesn't get reloaded in LatinIME.onStartInputViewInternal(). + public void onResetKeyboardStateToAlphabet() { + if (DEBUG_EVENT) { + Log.d(TAG, "onResetKeyboardStateToAlphabet: " + this); + } + resetKeyboardStateToAlphabet(); + } + private void updateAlphabetShiftState(int autoCaps) { if (!mIsAlphabetMode) return; if (!mShiftKeyState.isReleasing()) { |
