Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f5aeb8e authored by Hiroki Sato's avatar Hiroki Sato
Browse files

Clear relative axes in resampled events

When a resampled event is synthesized, PointerCoords instance is copied
from the last sample, and updates X and Y coordinates.
This copies all axes from the old pointer, but there are "relative"
axes, such as AXIS_RELATIVE_X, AXIS_RELATIVE_Y, AXIS_GESTURE_X_OFFSET,
etc. These values are relative from the last "real" sample, not from the
resampled sample.

With this change, these axes are populated with zero when an event is
resampled. This helps consumers of these values to correctly track
and accumulate value changes.

Bug: 423433478
Test: TouchResamplingTest, ResamplerTest
Flag: com.android.input.flags.clear_relative_axes_in_resampled_coords
Change-Id: I7090e4bbfeeedf1bd4dfd2b7f7862a1c4f45df18
parent fe2ccd6c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment