Skip to content
Snippets Groups Projects
Commit 1645902c authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Postpone gesture start detection on non-letter key

Bug: 7108223
Change-Id: Ie1ead5cec947ddf86c5150dca5b20b224527e511
parent a161bdac
No related branches found
No related tags found
No related merge requests found
...@@ -560,10 +560,13 @@ public class PointerTracker implements PointerTrackerQueue.Element { ...@@ -560,10 +560,13 @@ public class PointerTracker implements PointerTrackerQueue.Element {
return (sPointerTrackerQueue == null) ? 1 : sPointerTrackerQueue.size(); return (sPointerTrackerQueue == null) ? 1 : sPointerTrackerQueue.size();
} }
private void mayStartBatchInput() { private void mayStartBatchInput(final Key key) {
if (sInGesture || !mGestureStrokeWithPreviewPoints.isStartOfAGesture()) { if (sInGesture || !mGestureStrokeWithPreviewPoints.isStartOfAGesture()) {
return; return;
} }
if (key == null || !Character.isLetter(key.mCode)) {
return;
}
if (DEBUG_LISTENER) { if (DEBUG_LISTENER) {
Log.d(TAG, "onStartBatchInput"); Log.d(TAG, "onStartBatchInput");
} }
...@@ -742,7 +745,7 @@ public class PointerTracker implements PointerTrackerQueue.Element { ...@@ -742,7 +745,7 @@ public class PointerTracker implements PointerTrackerQueue.Element {
final int gestureTime = (int)(eventTime - sGestureFirstDownTime); final int gestureTime = (int)(eventTime - sGestureFirstDownTime);
if (mIsDetectingGesture) { if (mIsDetectingGesture) {
mGestureStrokeWithPreviewPoints.addPoint(x, y, gestureTime, isMajorEvent); mGestureStrokeWithPreviewPoints.addPoint(x, y, gestureTime, isMajorEvent);
mayStartBatchInput(); mayStartBatchInput(key);
if (sInGesture && key != null) { if (sInGesture && key != null) {
updateBatchInput(eventTime); updateBatchInput(eventTime);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment