am d73fbc01: am b7605910: Merge "Second finger can start gesture input" into jb-mr1-dev

* commit 'd73fbc01843dd66336bd0b0db88f75e2d1fe43fc':
  Second finger can start gesture input
main
Tadashi G. Takaoka 2012-09-24 09:36:34 -07:00 committed by Android Git Automerger
commit 5af8b3fc42
1 changed files with 5 additions and 10 deletions

View File

@ -685,18 +685,13 @@ public class PointerTracker implements PointerTrackerQueue.Element {
if (!sShouldHandleGesture) { if (!sShouldHandleGesture) {
return; return;
} }
final int activePointerTrackerCount = getActivePointerTrackerCount(); // A gesture should start only from the letter key.
if (activePointerTrackerCount == 1) { mIsDetectingGesture = (mKeyboard != null) && mKeyboard.mId.isAlphabetKeyboard()
mIsDetectingGesture = false; && !mIsShowingMoreKeysPanel && key != null && Keyboard.isLetterCode(key.mCode);
// A gesture should start only from the letter key. if (mIsDetectingGesture) {
final boolean isAlphabetKeyboard = (mKeyboard != null) if (getActivePointerTrackerCount() == 1) {
&& mKeyboard.mId.isAlphabetKeyboard();
if (isAlphabetKeyboard && !mIsShowingMoreKeysPanel && key != null
&& Keyboard.isLetterCode(key.mCode)) {
sGestureFirstDownTime = eventTime; sGestureFirstDownTime = eventTime;
onGestureDownEvent(x, y, eventTime);
} }
} else if (sInGesture && activePointerTrackerCount > 1) {
onGestureDownEvent(x, y, eventTime); onGestureDownEvent(x, y, eventTime);
} }
} }