From 6f0a60d10de056cbb89cf7984c9f8f64bb95db9d Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 3 Dec 2012 14:42:26 +0900 Subject: [PATCH] Cancel gesture preview update when gesture typing is canceled Bug: 7594165 Change-Id: I2854a49b2a2e5d3e36cafc5196191359fd2bf003 --- .../com/android/inputmethod/keyboard/PointerTracker.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index c3cf49f3b..73eab76f3 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -721,6 +721,9 @@ public final class PointerTracker implements PointerTrackerQueue.Element { if (key != null) { updateBatchInput(eventTime); } + if (mIsTrackingCanceled) { + return; + } mDrawingProxy.showGesturePreviewTrail(this, isOldestTrackerInQueue(this)); } @@ -759,6 +762,9 @@ public final class PointerTracker implements PointerTrackerQueue.Element { } } } + if (mIsTrackingCanceled) { + return; + } mDrawingProxy.showGesturePreviewTrail(this, isOldestTrackerInQueue(this)); }