Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3b18f4c authored by Linnan Li's avatar Linnan Li Committed by Cherrypicker Worker
Browse files

Add IS_GENERATED_GESTURE to MotionFlags in input.rs



Because IS_GENERATED_GESTURE is actually used in touchpad gestures, it
is a legitimate flag. We should add it to MotionFlags; otherwise,
MotionFlags::from_bits will return a None, which is not the result we
want.

Bug: 335391081

Test: Enable inbound event verification and use two finger swipe on
touchpad, device it should not crash.

Signed-off-by: default avatarLinnan Li <lilinnan@xiaomi.corp-partner.google.com>
(cherry picked from https://partner-android-review.googlesource.com/q/commit:fc358ec0877fd60e15645fe2683fa5ad5067a8eb)
Merged-In: I9c1a3f52508c106837bcabef0e10c71f69d1dadf
Change-Id: I9c1a3f52508c106837bcabef0e10c71f69d1dadf
parent 5494c190
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -194,6 +194,8 @@ bitflags! {
                input_bindgen::AMOTION_EVENT_FLAG_IS_ACCESSIBILITY_EVENT;
        /// FLAG_NO_FOCUS_CHANGE
        const NO_FOCUS_CHANGE = input_bindgen::AMOTION_EVENT_FLAG_NO_FOCUS_CHANGE;
        /// FLAG_IS_GENERATED_GESTURE
        const IS_GENERATED_GESTURE = input_bindgen::AMOTION_EVENT_FLAG_IS_GENERATED_GESTURE;
    }
}