From c9ba26994b946d35c375cd1cd9a6db2b23b3de7e Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 11 Oct 2012 14:19:03 +0900 Subject: [PATCH] Don't cancel long press timer too early Bug: 7328861 Change-Id: I1b77ec4a30ae15b2edda42a1ff58ebc528288553 --- java/src/com/android/inputmethod/keyboard/PointerTracker.java | 4 +--- .../android/inputmethod/keyboard/internal/GestureStroke.java | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index 361053337..291b65849 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -836,13 +836,11 @@ public final class PointerTracker implements PointerTrackerQueue.Element { // Register move event on gesture tracker. onGestureMoveEvent(x, y, eventTime, true /* isMajorEvent */, key); if (sInGesture) { + mTimerProxy.cancelLongPressTimer(); mCurrentKey = null; setReleasedKeyGraphics(oldKey); return; } - if (mGestureStrokeWithPreviewPoints.hasDetectedFastMove()) { - mTimerProxy.cancelLongPressTimer(); - } } if (key != null) { diff --git a/java/src/com/android/inputmethod/keyboard/internal/GestureStroke.java b/java/src/com/android/inputmethod/keyboard/internal/GestureStroke.java index c406f0c4f..f8244dd5b 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/GestureStroke.java +++ b/java/src/com/android/inputmethod/keyboard/internal/GestureStroke.java @@ -243,7 +243,7 @@ public class GestureStroke { mLastMajorEventY = y; } - public final boolean hasDetectedFastMove() { + private final boolean hasDetectedFastMove() { return mDetectFastMoveTime > 0; }