Make sure to send HOVER_EXIT when starting touch exploration if we haven't sent it already.

Fix: 290719741
Test: Manual. Repeatedly interrupt and continue touch exploration to trigger sending ACTION_HOVER_ENTER. This would previously cause a crash.
Change-Id: I7c35172c82c29289cac565a704bc5d4fbd579773
This commit is contained in:
Ameer Armaly
2023-07-26 16:40:56 +00:00
parent f72337cdc5
commit 2226b9880e

View File

@@ -1341,6 +1341,8 @@ public class TouchExplorer extends BaseEventStreamTransformation
Slog.e(LOG_TAG, "Unable to find a valid pointer for touch exploration.");
return;
}
// Send hover exit if we haven't closed a previous touch exploration event stream.
sendHoverExitAndTouchExplorationGestureEndIfNeeded(pointerId);
final int pointerIdBits = (1 << pointerId);
final int policyFlags = mState.getLastReceivedPolicyFlags();
mSendHoverEnterAndMoveDelayed.setPointerIdBits(pointerIdBits);