diff options
| author | 2024-08-23 11:11:13 +0000 | |
|---|---|---|
| committer | 2024-09-17 16:19:36 +0000 | |
| commit | 751553432cfca58381be7b7a7b39561d2c920b0e (patch) | |
| tree | af69e8baa0a9f09df9f70e62def26af3da0e628c /services/inputflinger/InputThread.cpp | |
| parent | e724b529b7a1c8ae81a3d10f0f856d7c0973cecd (diff) | |
CapturedTouchpadEventConverter: report relative axes
In the old touchpad stack, when a touchpad was captured we'd report
AXIS_RELATIVE_(X|Y) values for each finger, as offsets from the location
it had in the previous frame. When I implemented captured mode in the
new stack I didn't realize this, so the new stack introduced in Android
U doesn't report them. This causes problems for games that capture the
mouse pointer and use the relative axes for camera movement.
This is attempt 2; the original CL [0] had a unit test that was flaky
due to it accidentally making assertions about uninitialized memory. The
changes since that CL are to TwoFingers_motionReportedCorrectly in
CapturedTouchpadEventConverter_test.cpp (to change the last
WithPointerRelativeMotion call to WithRelativeMotion) and
TestEventMatchers.h (to use a class for WithPointerRelativeMotion and to
check for out-of-range pointer indexes).
[0]: Change ID I8a1caa4c9315dd41bc712fd9467146bb608cf6f3
Bug: 330522990
Bug: 365166534
Test: check the axis values using a test app
Test: $ atest inputflinger_tests:CapturedTouchpadEventConverterTest
Flag: com.android.input.flags.include_relative_axis_values_for_captured_touchpads
Change-Id: If6828f95e3aa359af479a708f95fbb5e31e5bc9a
Diffstat (limited to 'services/inputflinger/InputThread.cpp')
0 files changed, 0 insertions, 0 deletions