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

Skip to content
Commit b8c7f5eb authored by Harry Cutts's avatar Harry Cutts
Browse files

Reland "uinput: use nanoseconds for delay durations"

(This CL is unchanged. Original description below, with additional Test:
line)

evemu recordings use microseconds for their time intervals, but we can
only schedule handler calls in Device at millisecond precision. So far
we've converted the microseconds into milliseconds in EvemuParser, which
means that the precision losses compound over time (since each delay
will be slightly shorter than it should be, and the next delay will
start from that slightly earlier time, etc.). Keeping the delay
durations in a more precise unit up until the very last moment means
that we'll only get the precision loss once for each event. Since it's
somewhat uncommon to use microseconds elsewhere in Android code, and we
get the system time in nanoseconds, we may as well use nanoseconds
rather than microseconds.

Bug: 310958309
Test: play an evemu recording through uinput
Test: atest UinputTests
Test: atest android.view.cts.input.InputDeviceKeyLayoutMapTest \
            android.view.cts.input.InputDeviceSensorManagerTest \
	    --rerun-until-failure=10
Change-Id: Ibb968487ed114a4c464ac7061af4cda188e92498
parent 6d92ca22
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment