summaryrefslogtreecommitdiff
path: root/libs/input/Input.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2021-12-09 10:43:21 -0800
committer Siarhei Vishniakou <svv@google.com> 2021-12-09 11:49:41 -0800
commitf355bf982478381f838e8d3318aa67cede2daf10 (patch)
tree7082819ae3168f500d948aa412fff2e9d00a374a /libs/input/Input.cpp
parent0abd019f7574c6e47628f8c4507094f843682300 (diff)
Reorder VerifiedKey/MotionEvent structs for hwasan
Now, the 'nsecs_t' fields of this struct will no longer be falling on 4-byte boundaries. This prevents a hwasan crash. Bug: 209991446 Test: atest inputflinger_tests Change-Id: If28c7ff66b9495a3d61f590464d2b995afbe0c2b
Diffstat (limited to 'libs/input/Input.cpp')
-rw-r--r--libs/input/Input.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp
index 44487c3a85..f0b97a7ba8 100644
--- a/libs/input/Input.cpp
+++ b/libs/input/Input.cpp
@@ -192,8 +192,8 @@ VerifiedKeyEvent verifiedKeyEventFromKeyEvent(const KeyEvent& event) {
return {{VerifiedInputEvent::Type::KEY, event.getDeviceId(), event.getEventTime(),
event.getSource(), event.getDisplayId()},
event.getAction(),
- event.getDownTime(),
event.getFlags() & VERIFIED_KEY_EVENT_FLAGS,
+ event.getDownTime(),
event.getKeyCode(),
event.getScanCode(),
event.getMetaState(),
@@ -206,8 +206,8 @@ VerifiedMotionEvent verifiedMotionEventFromMotionEvent(const MotionEvent& event)
event.getRawX(0),
event.getRawY(0),
event.getActionMasked(),
- event.getDownTime(),
event.getFlags() & VERIFIED_MOTION_EVENT_FLAGS,
+ event.getDownTime(),
event.getMetaState(),
event.getButtonState()};
}