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
Loading
Please register or sign in to comment