MotionEvent: Differentiate directional support for AXIS_ORIENTATION
Ensure the private flags introduced in this topic do not get sent to
java.
Flag: NONE small behavioral change, where flagging is not required
Bug: 263310669
Test: atest TouchScreenTest libinput_tests inputflinger_tests
MotionEventTest
Change-Id: Ideef3eceaef3d8d2a55a545d23bef5e9e372bac4
diff --git a/native/android/input.cpp b/native/android/input.cpp
index 0a22314..9a8cda3 100644
--- a/native/android/input.cpp
+++ b/native/android/input.cpp
@@ -100,7 +100,8 @@
}
int32_t AMotionEvent_getFlags(const AInputEvent* motion_event) {
- return static_cast<const MotionEvent*>(motion_event)->getFlags();
+ return static_cast<const MotionEvent*>(motion_event)->getFlags() &
+ ~AMOTION_EVENT_PRIVATE_FLAG_MASK;
}
int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event) {