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
diff --git a/services/inputflinger/dispatcher/Entry.cpp b/services/inputflinger/dispatcher/Entry.cpp
index f6bb6a6..936ecf9 100644
--- a/services/inputflinger/dispatcher/Entry.cpp
+++ b/services/inputflinger/dispatcher/Entry.cpp
@@ -32,8 +32,8 @@
return {{VerifiedInputEvent::Type::KEY, entry.deviceId, entry.eventTime, entry.source,
entry.displayId},
entry.action,
- entry.downTime,
entry.flags & VERIFIED_KEY_EVENT_FLAGS,
+ entry.downTime,
entry.keyCode,
entry.scanCode,
entry.metaState,
@@ -50,8 +50,8 @@
rawXY.x,
rawXY.y,
actionMasked,
- entry.downTime,
entry.flags & VERIFIED_MOTION_EVENT_FLAGS,
+ entry.downTime,
entry.metaState,
entry.buttonState};
}