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
Loading
Please register or sign in to comment