InputDispatcher: Establish 1:1 relation between eventId and EventEntry
Previously, one event could be dispatched as events with different actions and flags to different windows. For example, a HOVER_MOVE event can technically be dispatched as HOVER_ENTER, HOVER_MOVE, or HOVER_EXIT. We achieved this by "overriding" the action and flags in the EventEntry using the DispatchEntry. This was further complicated by the fact that we wanted to generate a new eventId in some cases and not in others. To simplify this logic, we will establish a 1:1 relationship between eventId and EventEntry, so that eventIds will never be overridden during dispatch. We will also simplify things further by using a new eventId (therefore also creating a new EventEntry) whenever the action of an event is to change. There will no longer be an action override in DispatchEntry either. Even after this change, there are still fields that will need to be modified for each DispatchEntry, namely the flags and coordinates that take the window/display transforms into account, so this change is not intended to create a 1:1 relation between eventId and outbound events from InputDispatcher. Bug: 210460522 Test: atest inputflinger_tests Change-Id: I158267081814d856d7fedf05c02c284717533d6c
Loading
Please register or sign in to comment