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

Skip to content
Commit b13da8fa authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

InputDispatcher: Do not synthesize cancelations for zombie connections

When an input channel is removed, we mark it as a zombie connection in
Dispatcher.

Whenever we leave a critical section inside Dispatcher, it is possible
for an input channel to be removed. When handling fallback keys, we make
a policy call synchronously while processing the unhandled key
by releasing the lock. After returning from the policy call, it's
possible the input channel was removed, leaving the connection in a
zombie state.

When in this state, if we try to synthesize a cancelation event, we
would end up crashing. To avoid this, ensure we don't try to synthesize
cancelations for channels that aren't normal (i.e. broken or zombie
channels).

Bug: 319186639
Test: atest inputflinger_tests
Change-Id: I05a9b001de19bf26d81ea50a511d84bc3a2045d2
parent afb7d61d
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