Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b305e677 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Second finger can start gesture input

Bug: 7108075
Change-Id: I17c419086a86c0bdac7a3858f8c66f6893678e67
parent 1e974dea
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -685,18 +685,13 @@ public class PointerTracker implements PointerTrackerQueue.Element {
        if (!sShouldHandleGesture) {
            return;
        }
        final int activePointerTrackerCount = getActivePointerTrackerCount();
        if (activePointerTrackerCount == 1) {
            mIsDetectingGesture = false;
        // A gesture should start only from the letter key.
            final boolean isAlphabetKeyboard = (mKeyboard != null)
                    && mKeyboard.mId.isAlphabetKeyboard();
            if (isAlphabetKeyboard && !mIsShowingMoreKeysPanel && key != null
                    && Keyboard.isLetterCode(key.mCode)) {
        mIsDetectingGesture = (mKeyboard != null) && mKeyboard.mId.isAlphabetKeyboard()
                && !mIsShowingMoreKeysPanel && key != null && Keyboard.isLetterCode(key.mCode);
        if (mIsDetectingGesture) {
            if (getActivePointerTrackerCount() == 1) {
                sGestureFirstDownTime = eventTime;
                onGestureDownEvent(x, y, eventTime);
            }
        } else if (sInGesture && activePointerTrackerCount > 1) {
            onGestureDownEvent(x, y, eventTime);
        }
    }