diff options
author | 2013-05-13 17:19:21 +0900 | |
---|---|---|
committer | 2013-05-13 19:39:57 +0900 | |
commit | e3b1bdc4f18f77f54b33776ad698d57970acd722 (patch) | |
tree | 605617b6d2bbd31c6633c69c33299c676cacf6d2 /java/src | |
parent | 0efd8d1b692bb551f3283ecb6638656d4ab40752 (diff) | |
download | latinime-e3b1bdc4f18f77f54b33776ad698d57970acd722.tar.gz latinime-e3b1bdc4f18f77f54b33776ad698d57970acd722.tar.xz latinime-e3b1bdc4f18f77f54b33776ad698d57970acd722.zip |
Disable functional key while in sliding input mode
This change registers the functional key when sliding input mode is
end at the functional key itself.
Bug: 8915171
Change-Id: I2031e2aa4ebf33684221fc44d4a808112489724f
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/PointerTracker.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index 5a2af8015..a8327289b 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -1168,6 +1168,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element { private void onUpEventInternal(final int x, final int y, final long eventTime) { mTimerProxy.cancelKeyTimers(); + final boolean isInSlidingKeyInput = mIsInSlidingKeyInput; resetSlidingKeyInput(); mIsDetectingGesture = false; final Key currentKey = mCurrentKey; @@ -1197,9 +1198,11 @@ public final class PointerTracker implements PointerTrackerQueue.Element { if (mIsTrackingForActionDisabled) { return; } - if (currentKey != null && !currentKey.isRepeatable()) { - detectAndSendKey(currentKey, mKeyX, mKeyY, eventTime); + if (currentKey != null && currentKey.isRepeatable() && !isInSlidingKeyInput) { + // Repeatable key has been registered in {@link #onDownEventInternal(int,int,long)}. + return; } + detectAndSendKey(currentKey, mKeyX, mKeyY, eventTime); } public void onShowMoreKeysPanel(final int translatedX, final int translatedY, @@ -1251,7 +1254,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element { if (key == null) return; if (!key.isRepeatable()) return; // Don't start key repeat when we are in sliding input mode. - if (mIsInSlidingKeyInputFromModifier) return; + if (mIsInSlidingKeyInput) return; onRegisterKey(key); mTimerProxy.startKeyRepeatTimer(this); } @@ -1313,7 +1316,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element { // doesn't have its more keys. (e.g. spacebar, globe key) // We always need to start the long press timer if the key has its more keys regardless of // whether or not we are in the sliding input mode. - if (mIsInSlidingKeyInputFromModifier && key.mMoreKeys == null) return; + if (mIsInSlidingKeyInput && key.mMoreKeys == null) return; mTimerProxy.startLongPressTimer(this); } |