summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/DisplayDevice.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2023-12-21 19:47:20 -0800
committer Siarhei Vishniakou <svv@google.com> 2023-12-22 19:02:20 +0000
commite9ef6bc867c65da646e7e034b6605fd4dfc386d4 (patch)
treeebbdb0f3768e7119eeae81dab86aced9c97d0561 /services/surfaceflinger/DisplayDevice.cpp
parente0cafbac6bee907c895bc7b137605fe391074cbf (diff)
Query InputState for pointer information when canceling a gesture
When the dispatcher produces a synthetic HOVER_EXIT or ACTION_CANCEL, it relies on the InputState to get the correct coordinates of this event. That's because these events should use the same coordinates as the last dispatched HOVER_MOVE or ACTION_MOVE event, and this data is stored inside InputState. Before this CL, this logic was checked by "HoverIntoClone" test. When this test ran, the dispatcher produced scary messages, saying that it was canceling events because an inconsistent event was received. Another test that had these logs was StylusHoverAndDownNoInputChannel. This could also be easily reproduced by sending a HOVER_ENTER and then a HOVER_EXIT. The HOVER_EXIT event would get rejected, and the dispatcher would use InputState to generate its own. Now with this CL, these messages are gone because the dispatcher is querying for these coords proactively instead of using the cancellation mechanism of InputState. Bug: 317183325 Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="*StylusHoverAndDownNoInputChannel" Change-Id: I44a2446171ab5d2368d7b7f8d806e45d5bb855c0
Diffstat (limited to 'services/surfaceflinger/DisplayDevice.cpp')
0 files changed, 0 insertions, 0 deletions