Second finger can start gesture input
Bug: 7108075 Change-Id: I17c419086a86c0bdac7a3858f8c66f6893678e67main
parent
1e974deaa6
commit
b305e6775a
|
@ -685,18 +685,13 @@ public class PointerTracker implements PointerTrackerQueue.Element {
|
||||||
if (!sShouldHandleGesture) {
|
if (!sShouldHandleGesture) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final int activePointerTrackerCount = getActivePointerTrackerCount();
|
|
||||||
if (activePointerTrackerCount == 1) {
|
|
||||||
mIsDetectingGesture = false;
|
|
||||||
// A gesture should start only from the letter key.
|
// A gesture should start only from the letter key.
|
||||||
final boolean isAlphabetKeyboard = (mKeyboard != null)
|
mIsDetectingGesture = (mKeyboard != null) && mKeyboard.mId.isAlphabetKeyboard()
|
||||||
&& mKeyboard.mId.isAlphabetKeyboard();
|
&& !mIsShowingMoreKeysPanel && key != null && Keyboard.isLetterCode(key.mCode);
|
||||||
if (isAlphabetKeyboard && !mIsShowingMoreKeysPanel && key != null
|
if (mIsDetectingGesture) {
|
||||||
&& Keyboard.isLetterCode(key.mCode)) {
|
if (getActivePointerTrackerCount() == 1) {
|
||||||
sGestureFirstDownTime = eventTime;
|
sGestureFirstDownTime = eventTime;
|
||||||
onGestureDownEvent(x, y, eventTime);
|
|
||||||
}
|
}
|
||||||
} else if (sInGesture && activePointerTrackerCount > 1) {
|
|
||||||
onGestureDownEvent(x, y, eventTime);
|
onGestureDownEvent(x, y, eventTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue