Reland "uinput: Specify timestamps when injecting events..."
The reland fixes an issue where the time at registration would be used
for timestamp values forever unless `delay` commands were introduced.
(Original description, with additional Test line:)
Last year support for specifying timestamps for uinput events was added
to the Linux Kernel [0]. This allows us to give precise timestamps for
events being played back from an evemu recording, despite the actual
times at which we inject them being imprecise due to how threads and
the kernel are scheduled.
[0]: https://lore.kernel.org/lkml/20230427000152.1407471-1-biswarupp@google.com/
Bug: 310958309
Test: with the patch added to the device's kernel, play back pointing
stick and touchscreen recordings. Compare `getevent -lt` output
with the timestamps in the recordings to check that the offsets
between timestamps match (e.g. using a spreadsheet).
Test: atest UinputTests
Test: atest android.view.cts.input.InputDeviceKeyLayoutMapTest \
android.view.cts.input.InputDeviceSensorManagerTest \
--rerun-until-failure=10
Change-Id: Icf77e8adba075ab070806311f31c6a5e1bd98bc9
7 files changed