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

Skip to content
Commit be530ebf authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Don't store the departing pointer in InputState

Before this CL, InputState stored the pointer that is leaving.
This is a problem when the request to cancel the current gesture comes
in. To cancel the gesture, the currently stored pointers were used. That
means that in a sequence of ACTION_DOWN -> ACTION_POINTER_DOWN ->
ACTION_POINTER_UP -> CANCEL, the cancel event would still be produced
with two pointers.

The correct behaviour to is to cancel the remaining pointer.

The solution here skips the addition of the departing pointer to the
InputState, and modifies the pointerCount appropriately.

Bug: 211379801
Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests --gtest_filter="*CancelAfterPointer0Up*"
Change-Id: I8323cc08a974d0ec880b5570f0cd572ee071522a
parent 06897bdb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment