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

Commit da8c253b authored by Ameer Armaly's avatar Ameer Armaly Committed by Android (Google) Code Review
Browse files

Merge "Fix NullPointerException on double tap on hold."

parents 431db93d fd43c315
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -37,6 +37,12 @@ class MultiTapAndHold extends MultiTap {
        }
    }

    @Override
    protected void onUp(MotionEvent event, MotionEvent rawEvent, int policyFlags) {
        super.onUp(event, rawEvent, policyFlags);
        cancelAfterDoubleTapTimeout(event, rawEvent, policyFlags);
    }

    @Override
    public String getGestureName() {
        switch (mTargetTaps) {
+0 −4
Original line number Diff line number Diff line
@@ -286,10 +286,6 @@ public class TouchExplorer extends BaseEventStreamTransformation

    @Override
    public void onDoubleTapAndHold() {
        // Pointers should not be zero when running this command.
        if (mState.getLastReceivedEvent().getPointerCount() == 0) {
            return;
        }
        // Try to use the standard accessibility API to long click
        if (!mAms.performActionOnAccessibilityFocusedItem(
                AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK)) {