From 8a26e85387d7fb964b76af502a6e89574d85d58d Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Fri, 15 Oct 2010 17:56:05 +0900 Subject: [PATCH] Fix an issue of adding extra character. LatinKeyboardBaseView should have removed "long pressed" pointer tracker from the multi-touch pointer queue. bug: 3099130 Change-Id: I3d358a373b0de07558a204e9ff5a95e9ece38bcc --- .../android/inputmethod/latin/LatinKeyboardBaseView.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java index b3f1364d8..c1b1008b0 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java @@ -214,7 +214,10 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx private OnKeyboardActionListener mKeyboardActionListener; private final ArrayList mPointerTrackers = new ArrayList(); + + // TODO: Let the PointerTracker class manage this pointer queue private final PointerQueue mPointerQueue = new PointerQueue(); + private final boolean mHasDistinctMultitouch; private int mOldPointerCount = 1; @@ -1053,8 +1056,10 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx boolean result = onLongPress(popupKey); if (result) { dismissKeyPreview(); - tracker.setAlreadyProcessed(); mMiniKeyboardTrackerId = tracker.mPointerId; + // Mark this tracker "already processed" and remove it from the pointer queue + tracker.setAlreadyProcessed(); + mPointerQueue.remove(tracker); } return result; }