Add FocusEvent and InputMessage::Type::FOCUS
FocusEvents will be consumed by InputConsumer on the app side. They
will be used to notify app that focus has been gained / lost. They will
also carry information about the current state of touch mode.
Also add a new type of InputMessage with type FOCUS.
This new data structure will be used to pass focus events to the apps
from input across the socket.
Bug: 70668286
Test: presubmit
Change-Id: I88582c64ee41ecb49623b9b7f5c149eafa694788
diff --git a/include/android/input.h b/include/android/input.h
index ce439c6..f51cd79 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -158,7 +158,10 @@
AINPUT_EVENT_TYPE_KEY = 1,
/** Indicates that the input event is a motion event. */
- AINPUT_EVENT_TYPE_MOTION = 2
+ AINPUT_EVENT_TYPE_MOTION = 2,
+
+ /** Focus event */
+ AINPUT_EVENT_TYPE_FOCUS = 3,
};
/**