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

Commit 0d352887 authored by Ameer Armaly's avatar Ameer Armaly
Browse files

Fix service touch exploration.

We were queueing up ACTION_HOVER_EXIT when initiating touch exploration which doesn't make sense. ACTION_HOVER_EXIT only makes sense on ACTION_UP when touch exploring.

Fix: 219814318
Fix: 220387502
Test: Verify that entering a pin works as expected.
Test: Verify that touch exploration does not get stuck often, only occasionally per b/215654623
Change-Id: Iab29f7736ab4ff3ea24c26109073481a876ffb58
parent 836db75e
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -1327,14 +1327,13 @@ public class TouchExplorer extends BaseEventStreamTransformation
        if (mState.isServiceDetectingGestures() && mState.isTouchInteracting()) {
            // Cancel without deleting events.
            mHandler.removeCallbacks(mSendHoverEnterAndMoveDelayed);
            mSendHoverEnterAndMoveDelayed.run();
            mSendHoverEnterAndMoveDelayed.clear();
            final MotionEvent prototype = mState.getLastReceivedEvent();
            final MotionEvent rawEvent = mState.getLastReceivedRawEvent();
            final int pointerId = mReceivedPointerTracker.getPrimaryPointerId();
            final int pointerIdBits = (1 << pointerId);
            final int policyFlags = mState.getLastReceivedPolicyFlags();
            mSendHoverExitDelayed.post(prototype, rawEvent, pointerIdBits, policyFlags);
            mSendHoverEnterAndMoveDelayed.setPointerIdBits(pointerIdBits);
            mSendHoverEnterAndMoveDelayed.setPolicyFlags(policyFlags);
            mSendHoverEnterAndMoveDelayed.run();
            mSendHoverEnterAndMoveDelayed.clear();
        }
    }