diff options
author | Garfield Tan <xutan@google.com> | 2020-01-24 11:32:14 -0800 |
---|---|---|
committer | Garfield Tan <xutan@google.com> | 2020-02-24 12:45:27 -0800 |
commit | c8362b24f672710a96b12c004577c91da587f0f8 (patch) | |
tree | 73d3a4bfb1a15121eed3a7dc3061b8f935c7a9c3 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 27f83cdbcefd687632811996e25ece99f7e1ac69 (diff) |
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 29d21d4062f90a1c79971e5380426fc54b307807)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions