Add ID to InputEvent.
The interaction between Java and native code for KeyEvent and MotionEvent is different, so I used different arrangement to pass sequence number across JNI that keeps the consistency with other metadata. Unfortunately this new ID doesn't have absolute uniqueness guarantee so it can't replace InputEvent#getSequenceNumber() which is used with a strict in-process uniqueness assumption. Therefore only convert systrace related use to ID. Also expose ID generator through a static function in InputEvent so that everyone can use it. InputReader and InputDispatcher will use different instances. Bug: 144889238 Test: Build and run. Test: atest FrameworksCoreTests:KeyEventTest Test: atest FrameworksCoreTests:MotionEventTest Change-Id: Icbdcaee1d98948c05484865a4e15e55161ecfa69 Merged-In: Icbdcaee1d98948c05484865a4e15e55161ecfa69 (cherry picked from 29d21d40)
Loading
Please register or sign in to comment