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
main
Ken Wakasa 2010-10-15 17:56:05 +09:00
parent ace15025c3
commit 8a26e85387
1 changed files with 6 additions and 1 deletions

View File

@ -214,7 +214,10 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
private OnKeyboardActionListener mKeyboardActionListener; private OnKeyboardActionListener mKeyboardActionListener;
private final ArrayList<PointerTracker> mPointerTrackers = new ArrayList<PointerTracker>(); private final ArrayList<PointerTracker> mPointerTrackers = new ArrayList<PointerTracker>();
// TODO: Let the PointerTracker class manage this pointer queue
private final PointerQueue mPointerQueue = new PointerQueue(); private final PointerQueue mPointerQueue = new PointerQueue();
private final boolean mHasDistinctMultitouch; private final boolean mHasDistinctMultitouch;
private int mOldPointerCount = 1; private int mOldPointerCount = 1;
@ -1053,8 +1056,10 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
boolean result = onLongPress(popupKey); boolean result = onLongPress(popupKey);
if (result) { if (result) {
dismissKeyPreview(); dismissKeyPreview();
tracker.setAlreadyProcessed();
mMiniKeyboardTrackerId = tracker.mPointerId; mMiniKeyboardTrackerId = tracker.mPointerId;
// Mark this tracker "already processed" and remove it from the pointer queue
tracker.setAlreadyProcessed();
mPointerQueue.remove(tracker);
} }
return result; return result;
} }