summaryrefslogtreecommitdiff
path: root/libs/jpegrecoverymap/jpegencoderhelper.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2023-02-14 18:06:51 -0800
committer Siarhei Vishniakou <svv@google.com> 2023-02-21 17:08:10 +0000
commitf372b81eba47c89e26ee320559d59c33e384742c (patch)
tree2f57e340346544f049629997a8f18b6b43e015c7 /libs/jpegrecoverymap/jpegencoderhelper.cpp
parent16e4fa05e8ae620cb8247de72af8c0038bfee7c3 (diff)
Allow new gestures to cancel current gestures
In a previous patch, we chose to ignore new gestures whenever there's currently an active gesture. Generally this is fine to do, but there are some concerns around doing that: 1) This is different from the previous behaviour, and some tests were relying on the previous behaviour. 2) If a test injects an ACTION_DOWN event (globally) and never lifts up the pointer, this would cause all real subsequent events to be rejected. That means a bad test can cause device to get into a bad state. Rather than adding a special case to deal with 2), let's revert to the previous behaviour. Since we are now allowing the new device to take over, and only 1 device can be active at a time (for now), we must reset the touching pointers whenever we have a new gesture starting. That's because the function synthesizeCancelationEventsForAllConnectionsLocked does not modify TouchState. We should also be canceling any of the currently hovering pointers by sending an ACTION_HOVER_EXIT if a touch down occurs. This behaviour was previously inconsistent in the mouse case. Once per-device functionality is enabled, this behaviour will be revisited. Bug: 268683979 Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests Merged-In: I10c7ebde7c108baecb67a865f541253fa6e5f7ef Change-Id: I10c7ebde7c108baecb67a865f541253fa6e5f7ef (cherry picked from commit 837fab15be20e5960870e69065fda3645ef076ea)
Diffstat (limited to 'libs/jpegrecoverymap/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions