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/include/input/Input.h b/include/input/Input.h
index 29503af..e1cacac 100644
--- a/include/input/Input.h
+++ b/include/input/Input.h
@@ -945,8 +945,8 @@
*/
struct __attribute__((__packed__)) VerifiedKeyEvent : public VerifiedInputEvent {
int32_t action;
- nsecs_t downTimeNanos;
int32_t flags;
+ nsecs_t downTimeNanos;
int32_t keyCode;
int32_t scanCode;
int32_t metaState;
@@ -961,8 +961,8 @@
float rawX;
float rawY;
int32_t actionMasked;
- nsecs_t downTimeNanos;
int32_t flags;
+ nsecs_t downTimeNanos;
int32_t metaState;
int32_t buttonState;
};