InputDispatcher: Use a single dispatch mode per target
Previously, the concept of dispatch mode was intertwined with InputTarget flags. Since dispatch modes were part of the flags, it was possible for an InputTarget of one event to be receive the event through more than one dispatch mode. Right now, there should be no use case for a target to have one event dispatched through multiple dispatch modes. Even for the case in which an ACTION_DOWN for a hovering pointer should generate both HOVER_EXIT and ACTION_DOWN, this process is handled by using two InputTargets instead of reusing one target to send both events. We pull out the dispatch modes from the target flags into its own enum. Dispatch modes are no longer flags, so each input target will have exactly one dispatch mode. If an event should be dispatched via multiple modes to the same window, mutiple InputTargets should be used. Bug: 210460522 Test: atest inpuflinger_tests Change-Id: I6c3f082ad48e312db6fcdeb7ef7c158d9dc53c2d
Loading
Please register or sign in to comment