diff options
author | 2020-01-23 14:20:11 -0600 | |
---|---|---|
committer | 2020-01-24 17:57:44 -0600 | |
commit | 9c858ac6573d32a98d24cc0da0722592873ae3ec (patch) | |
tree | db242d0b55c969eafb400d1396e78ac2be02fa07 /libs/input/KeyCharacterMap.cpp | |
parent | 4274794a833b94f81bbd7b398ed399fe6979ad51 (diff) |
Add hmac to InputEvent and scale to MotionEvent
We need to pass some additional data to the app to be able to construct
the MotionEvent.
For proper support of getRawX/getRawY, add the xScale and yScale to
MotionEvent.
For the verification of input events, add hmac to InputEvent.
Bug: 134977432
Bug: 140786233
Test: atest libinput_tests inputflinger_tests
Change-Id: Ia3400ebbd9698549aad4d97a3b789ab7e10f6b65
Diffstat (limited to 'libs/input/KeyCharacterMap.cpp')
-rw-r--r-- | libs/input/KeyCharacterMap.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/input/KeyCharacterMap.cpp b/libs/input/KeyCharacterMap.cpp index e189d20e28..6f9b162986 100644 --- a/libs/input/KeyCharacterMap.cpp +++ b/libs/input/KeyCharacterMap.cpp @@ -487,9 +487,9 @@ void KeyCharacterMap::addKey(Vector<KeyEvent>& outEvents, int32_t deviceId, int32_t keyCode, int32_t metaState, bool down, nsecs_t time) { outEvents.push(); KeyEvent& event = outEvents.editTop(); - event.initialize(deviceId, AINPUT_SOURCE_KEYBOARD, ADISPLAY_ID_NONE, - down ? AKEY_EVENT_ACTION_DOWN : AKEY_EVENT_ACTION_UP, - 0, keyCode, 0, metaState, 0, time, time); + event.initialize(deviceId, AINPUT_SOURCE_KEYBOARD, ADISPLAY_ID_NONE, INVALID_HMAC, + down ? AKEY_EVENT_ACTION_DOWN : AKEY_EVENT_ACTION_UP, 0, keyCode, 0, metaState, + 0, time, time); } void KeyCharacterMap::addMetaKeys(Vector<KeyEvent>& outEvents, |