summaryrefslogtreecommitdiff
path: root/TEST_MAPPING
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2023-02-08 15:43:38 -0800
committer Siarhei Vishniakou <svv@google.com> 2023-02-09 07:29:16 -0800
commit5bf25d98693abcdb247e47f950fe661459b348ad (patch)
treee6be65b8600e8d9738c66194047d7131a478e43c /TEST_MAPPING
parent8a878356682afb9801816785ab7ade6f68384108 (diff)
Add POLICY_FLAG_PASS_TO_USER to complete the gesture
Before an input event is processed by the dispatcher, the policy has the chance to intercept it. The policy sets POLICY_FLAG_PASS_TO_USER if it wants the event to be processed by the dispatcher, and does not set this flag if it wants the event to get dropped. If the device becomes non-interactive, the policy would stop sending this flag. This could happen in the middle of the gesture. To account for this, check whether there's an active stream inside the dispatcher, and finish the gesture if so. This allows the policy implementation to remain simple. If we wanted the policy to be consistent (either the whole gesture is sent to the app, or the whole gesture isn't), it would complicate the policy implementation and require it to keep state. Dispatcher already keeps the state, so we fix this in the dispatcher. Bug: 267614813 Test: atest inputflinger_tests:InputDispatcherTest#TwoPointerCancel Change-Id: I8d162c658f4f53a76d32d5e5a1de8ac3722e277d
Diffstat (limited to 'TEST_MAPPING')
0 files changed, 0 insertions, 0 deletions