Merge "Allow to start gesture from a non-letter key except from a modifier key"

main
Tadashi G. Takaoka 2012-10-09 02:20:28 -07:00 committed by Android (Google) Code Review
commit 7cbb7f92ee
1 changed files with 2 additions and 2 deletions

View File

@ -757,9 +757,9 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (!sShouldHandleGesture) { if (!sShouldHandleGesture) {
return; return;
} }
// A gesture should start only from the letter key. // A gesture should start only from a non-modifier key.
mIsDetectingGesture = (mKeyboard != null) && mKeyboard.mId.isAlphabetKeyboard() mIsDetectingGesture = (mKeyboard != null) && mKeyboard.mId.isAlphabetKeyboard()
&& !mIsShowingMoreKeysPanel && key != null && Keyboard.isLetterCode(key.mCode); && !mIsShowingMoreKeysPanel && key != null && !key.isModifier();
if (mIsDetectingGesture) { if (mIsDetectingGesture) {
if (getActivePointerTrackerCount() == 1) { if (getActivePointerTrackerCount() == 1) {
sGestureFirstDownTime = eventTime; sGestureFirstDownTime = eventTime;