aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/keyboard/PointerTracker.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/PointerTracker.java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/PointerTracker.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index 59a3c99aa..036372c37 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -98,6 +98,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
public boolean isInDoubleTapTimeout();
public void cancelKeyTimers();
public void startUpdateBatchInputTimer(PointerTracker tracker);
+ public void cancelUpdateBatchInputTimer(PointerTracker tracker);
public void cancelAllUpdateBatchInputTimers();
public static class Adapter implements TimerProxy {
@@ -124,6 +125,8 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
@Override
public void startUpdateBatchInputTimer(PointerTracker tracker) {}
@Override
+ public void cancelUpdateBatchInputTimer(PointerTracker tracker) {}
+ @Override
public void cancelAllUpdateBatchInputTimers() {}
}
}
@@ -791,6 +794,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
private void cancelBatchInput() {
sPointerTrackerQueue.cancelAllPointerTracker();
+ mIsDetectingGesture = false;
if (!sInGesture) {
return;
}
@@ -916,8 +920,13 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
final boolean isMajorEvent, final Key key) {
final int gestureTime = (int)(eventTime - sGestureFirstDownTime);
if (mIsDetectingGesture) {
+ final int beforeLength = mGestureStrokeWithPreviewPoints.getLength();
final boolean onValidArea = mGestureStrokeWithPreviewPoints.addPointOnKeyboard(
x, y, gestureTime, isMajorEvent);
+ if (mGestureStrokeWithPreviewPoints.getLength() > beforeLength) {
+ mTimerProxy.startUpdateBatchInputTimer(this);
+ }
+ // If the move event goes out from valid batch input area, cancel batch input.
if (!onValidArea) {
cancelBatchInput();
return;
@@ -1122,6 +1131,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
printTouchEvent("onUpEvent :", x, y, eventTime);
}
+ mTimerProxy.cancelUpdateBatchInputTimer(this);
if (!sInGesture) {
if (mCurrentKey != null && mCurrentKey.isModifier()) {
// Before processing an up event of modifier key, all pointers already being
@@ -1196,6 +1206,9 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
@Override
public void cancelTracking() {
+ if (isShowingMoreKeysPanel()) {
+ return;
+ }
mIsTrackingCanceled = true;
}