diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2012-02-16 11:45:35 -0800 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2012-02-16 18:02:17 -0800 |
| commit | beb08b398fa73a26f2d42d6feec87e34a96ca2d9 (patch) | |
| tree | 0d7e415c8003973f1dc71db379a4319cf620778c /java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | |
| parent | 25ff89a75cb8b797bdaf0c7b78e50fd454c1b1e2 (diff) | |
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/keyboard/KeyboardSwitcher.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 5ba560d72..d5e5a4e53 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -268,6 +268,16 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions, // Implements {@link KeyboardState.SwitchActions}. @Override + public void cancelDoubleTapTimer() { + final LatinKeyboardView keyboardView = getKeyboardView(); + if (keyboardView != null) { + final TimerProxy timer = keyboardView.getTimerProxy(); + timer.cancelDoubleTapTimer(); + } + } + + // Implements {@link KeyboardState.SwitchActions}. + @Override public boolean isInDoubleTapTimeout() { final LatinKeyboardView keyboardView = getKeyboardView(); return (keyboardView != null) @@ -286,6 +296,16 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions, // Implements {@link KeyboardState.SwitchActions}. @Override + public void cancelLongPressTimer() { + final LatinKeyboardView keyboardView = getKeyboardView(); + if (keyboardView != null) { + final TimerProxy timer = keyboardView.getTimerProxy(); + timer.cancelLongPressTimer(); + } + } + + // Implements {@link KeyboardState.SwitchActions}. + @Override public void hapticAndAudioFeedback(int code) { mInputMethodService.hapticAndAudioFeedback(code); } |
