diff options
author | 2013-10-02 15:58:21 +0900 | |
---|---|---|
committer | 2013-10-02 16:57:36 +0900 | |
commit | f735117d36237f08fd7512789f922f18c6b1aa53 (patch) | |
tree | 2e47ac339b45b793fcad4e13bd15ce4373374037 /java/src | |
parent | 74577bedb3bb0dabd0e661270f9da0c11c4b0f46 (diff) | |
download | latinime-f735117d36237f08fd7512789f922f18c6b1aa53.tar.gz latinime-f735117d36237f08fd7512789f922f18c6b1aa53.tar.xz latinime-f735117d36237f08fd7512789f922f18c6b1aa53.zip |
Fix a pernicious bug with caps.
What's happening here is, setAlphabetKeyboard sets the
keyboard to AUTOMATIC_SHIFTED and updates the keyboard, then
restoring the keyboard old state sets it back to UNSHIFTED without
updating it. When we finally know what the correct value is,
we try to set it to UNSHIFTED, but since that's already the currently
recorded state, it skips updating the keyboard forever.
The solution is to avoid setting the shift state without updating the
keyboard.
Bug: 10948582
Change-Id: Ic8670401e378f8284e851281f91a9ad93eac8e90
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java | 2 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 1 |
2 files changed, 3 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 9f9fdaa6f..506dfa751 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java @@ -178,6 +178,8 @@ public final class KeyboardState { if (!state.mIsAlphabetShiftLocked) { setShifted(state.mShiftMode); } + // TODO: is this the right place to do this? Should we do this in setShift* instead? + mSwitchActions.requestUpdatingShiftState(); } else { mPrevMainKeyboardWasShiftLocked = state.mIsAlphabetShiftLocked; } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 96e16de0d..003dcfb5c 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -2929,6 +2929,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen return; } tryFixLyingCursorPosition(); + mKeyboardSwitcher.updateShiftState(); if (tryResumeSuggestions) mHandler.postResumeSuggestions(); } |