Merge "Postpone gesture start detection on non-letter key" into jb-mr1-dev
This commit is contained in:
commit
1354910f7a
1 changed files with 5 additions and 2 deletions
|
@ -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 {
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue