diff options
author | 2022-12-16 21:26:24 +0000 | |
---|---|---|
committer | 2023-01-09 14:36:12 +0000 | |
commit | ef400b26ab180b0dd7a7cf8f306d2ac72fcfe40a (patch) | |
tree | 1d89e613e7b4bc109e74b4c830e6ec0294afa75b /include/android/input.h | |
parent | 2e2c00f8df0e2bfcadc0b2df544065c82cd42cb9 (diff) |
Report two-finger touchpad swipes
Bug: 251196347
Test: try out two-finger scroll gestures with an Apple Magic Trackpad 2
Test: atest inputflinger_tests
Change-Id: I9e693350873b90bd50605ab348821224ae1121a8
Diffstat (limited to 'include/android/input.h')
-rw-r--r-- | include/android/input.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/android/input.h b/include/android/input.h index a0b46de260..e1aac65457 100644 --- a/include/android/input.h +++ b/include/android/input.h @@ -786,6 +786,19 @@ enum { * The same as {@link AMOTION_EVENT_AXIS_GESTURE_X_OFFSET}, but for the Y axis. */ AMOTION_EVENT_AXIS_GESTURE_Y_OFFSET = 49, + /** + * Axis constant: X scroll distance axis of a motion event. + * + * - For a touch pad, reports the distance that should be scrolled in the X axis as a result of + * the user's two-finger scroll gesture, in display pixels. + */ + AMOTION_EVENT_AXIS_GESTURE_SCROLL_X_DISTANCE = 50, + /** + * Axis constant: Y scroll distance axis of a motion event. + * + * The same as {@link AMOTION_EVENT_AXIS_GESTURE_SCROLL_X_DISTANCE}, but for the Y axis. + */ + AMOTION_EVENT_AXIS_GESTURE_SCROLL_Y_DISTANCE = 51, /** * Note: This is not an "Axis constant". It does not represent any axis, nor should it be used @@ -793,7 +806,7 @@ enum { * to make some computations (like iterating through all possible axes) cleaner. * Please update the value accordingly if you add a new axis. */ - AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE = AMOTION_EVENT_AXIS_GESTURE_Y_OFFSET, + AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE = AMOTION_EVENT_AXIS_GESTURE_SCROLL_Y_DISTANCE, // NOTE: If you add a new axis here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list. |