aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-09-14 14:00:51 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-09-24 15:31:51 +0900
commitb305e6775a214f1cc16e584484e26a47eb8baa52 (patch)
tree3873b43bf1330109914eedcbd3f4d6dc939b1f59 /java/src
parent1e974deaa61c5ed1a8e64fb623ddd0b6af09bc3e (diff)
downloadlatinime-b305e6775a214f1cc16e584484e26a47eb8baa52.tar.gz
latinime-b305e6775a214f1cc16e584484e26a47eb8baa52.tar.xz
latinime-b305e6775a214f1cc16e584484e26a47eb8baa52.zip
Second finger can start gesture input
Bug: 7108075 Change-Id: I17c419086a86c0bdac7a3858f8c66f6893678e67
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/PointerTracker.java15
1 files changed, 5 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index 89b6e7bc5..0778ad902 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -685,18 +685,13 @@ public class PointerTracker implements PointerTrackerQueue.Element {
if (!sShouldHandleGesture) {
return;
}
- final int activePointerTrackerCount = getActivePointerTrackerCount();
- if (activePointerTrackerCount == 1) {
- mIsDetectingGesture = false;
- // A gesture should start only from the letter key.
- final boolean isAlphabetKeyboard = (mKeyboard != null)
- && mKeyboard.mId.isAlphabetKeyboard();
- if (isAlphabetKeyboard && !mIsShowingMoreKeysPanel && key != null
- && Keyboard.isLetterCode(key.mCode)) {
+ // A gesture should start only from the letter key.
+ mIsDetectingGesture = (mKeyboard != null) && mKeyboard.mId.isAlphabetKeyboard()
+ && !mIsShowingMoreKeysPanel && key != null && Keyboard.isLetterCode(key.mCode);
+ if (mIsDetectingGesture) {
+ if (getActivePointerTrackerCount() == 1) {
sGestureFirstDownTime = eventTime;
- onGestureDownEvent(x, y, eventTime);
}
- } else if (sInGesture && activePointerTrackerCount > 1) {
onGestureDownEvent(x, y, eventTime);
}
}