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

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

Ensure canceled touch stream uses previous display id

We are observing inconsistent event streams being sent out of
TouchInputMapper. Whenever display id associated with a specific device
changes while touch is in progress, the generated ACTION_CANCEL event
has the new display id instead of the original one.

This causes issues later in the pipeline. In the case when a11y is ON,
the events are sent to a11y and get later re-injected into
InputDispatcher. The InputDispatcher will not resolve the correct
verifier, and as a result will incorrectly reject the event.

In this CL, we are storing the previous display id before
reconfiguration occurs, and then using this stored display id to abort
touches just before reset() is called.

In reset(), we are also canceling touches. That behaviour has to be
maintained, since reset() is a public API that can be called from other
places.

Bug: 378308551
Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="*ChangeAssociatedDisplayIdWhenTouchIsActive*"
Flag: EXEMPT bugfix
Change-Id: I275bdd03929be6dd024c250c1276c05622a0e2ce
parent d1f56301
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