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

Commit 4b8fac01 authored by Ameer Armaly's avatar Ameer Armaly
Browse files

[DO NOT MERGE] TouchExplorer: do not use accessibility action to long click.

This got overlooked during the initial revert.
Bug: 159941636
Test: atest TouchExplorerTest

Change-Id: I257852d69e299c7f0302d15b23d96f302f922005
parent f48c1931
Loading
Loading
Loading
Loading
+3 −8
Original line number Original line Diff line number Diff line
@@ -309,16 +309,11 @@ public class TouchExplorer extends BaseEventStreamTransformation


    @Override
    @Override
    public void onDoubleTapAndHold(MotionEvent event, MotionEvent rawEvent, int policyFlags) {
    public void onDoubleTapAndHold(MotionEvent event, MotionEvent rawEvent, int policyFlags) {
        // Try to use the standard accessibility API to long click
        if (!mAms.performActionOnAccessibilityFocusedItem(
                AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK)) {
            Slog.e(LOG_TAG, "ACTION_LONG_CLICK failed.");
        if (mDispatcher.longPressWithTouchEvents(event, policyFlags)) {
        if (mDispatcher.longPressWithTouchEvents(event, policyFlags)) {
            sendHoverExitAndTouchExplorationGestureEndIfNeeded(policyFlags);
            sendHoverExitAndTouchExplorationGestureEndIfNeeded(policyFlags);
            mState.startDelegating();
            mState.startDelegating();
        }
        }
    }
    }
    }


    @Override
    @Override
    public boolean onDoubleTap(MotionEvent event, MotionEvent rawEvent, int policyFlags) {
    public boolean onDoubleTap(MotionEvent event, MotionEvent rawEvent, int policyFlags) {