diff options
author | 2012-02-16 11:45:35 -0800 | |
---|---|---|
committer | 2012-02-16 18:02:17 -0800 | |
commit | beb08b398fa73a26f2d42d6feec87e34a96ca2d9 (patch) | |
tree | 0d7e415c8003973f1dc71db379a4319cf620778c /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 25ff89a75cb8b797bdaf0c7b78e50fd454c1b1e2 (diff) | |
download | latinime-beb08b398fa73a26f2d42d6feec87e34a96ca2d9.tar.gz latinime-beb08b398fa73a26f2d42d6feec87e34a96ca2d9.tar.xz latinime-beb08b398fa73a26f2d42d6feec87e34a96ca2d9.zip |
Remove unnecessary and harmful KeyboardState.onUpdateShiftState call
This change also cancels double tap and long press timers if other
letter key is pressed after shift key.
Bug: 5693999
Bug: 6017610
Change-Id: I3b5f3debfb8915fa73a93b409a38afadf24132e9
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 1cb79e707..730992b13 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -325,7 +325,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar return hasMessages(MSG_UPDATE_SUGGESTIONS); } - public void postUpdateShiftKeyState() { + public void postUpdateShiftState() { removeMessages(MSG_UPDATE_SHIFT_STATE); sendMessageDelayed(obtainMessage(MSG_UPDATE_SHIFT_STATE), mDelayUpdateShiftState); } @@ -898,9 +898,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar resetComposingState(true /* alsoResetLastComposedWord */); updateSuggestions(); } + + mHandler.postUpdateShiftState(); } mExpectingUpdateSelection = false; - mHandler.postUpdateShiftKeyState(); // TODO: Decide to call restartSuggestionsOnWordBeforeCursorIfAtEndOfWord() or not // here. It would probably be too expensive to call directly here but we may want to post a // message to delay it. The point would be to unify behavior between backspace to the @@ -1391,7 +1392,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mVoiceProxy.handleBackspace(); // In many cases, we may have to put the keyboard in auto-shift state again. - mHandler.postUpdateShiftKeyState(); + mHandler.postUpdateShiftState(); if (mEnteredText != null && sameAsTextBeforeCursor(ic, mEnteredText)) { // Cancel multi-character input: remove the text we just entered. |