InputDispatcher: Only dispatch fallback keys when there's a window
InputDispatcher has an invariant where an input channel must have a
window for dispatcher to be able to target an event to the channel
(i.e. enqueue the event onto the channel's outbound queue - excluding
global monitors).
Fallback key handling logic seems to be the only place where this
invariant does not explicitly hold.
In this CL, we add checks to the fallback logic to uphold this invariant
and ensure the channel has at least one window before generating events
for it.
Bug: 210460522
Test: atest inputflinger_tests
Change-Id: I76ef8b559150a44dc98ea42e52fa92a6b90cde3a
2 files changed