summaryrefslogtreecommitdiff
path: root/native/android/input.cpp
diff options
context:
space:
mode:
author Harry Cutts <hcutts@google.com> 2022-09-15 13:59:09 +0000
committer Harry Cutts <hcutts@google.com> 2022-09-23 13:38:21 +0000
commit7013c869e6f78d03ad626b5d29315dda9ee84fb9 (patch)
tree243ff48b9b179731a9c6ce264e6ee365ead94360 /native/android/input.cpp
parentb91f96a938e964d69d7888188a260d384eef7b5f (diff)
Add CLASSIFICATION_TWO_FINGER_SCROLL for touchpad scrolling
This will be used to denote the single-finger touches that TouchInputMapper creates to simulate scrolling when the user makes two-finger swipes on the touchpad. Bug: 246758376 Test: check new value is sent to a test app when scrolling on a touchpad Change-Id: Id93cba764522e36d850f7013ab8a117f64716fac
Diffstat (limited to 'native/android/input.cpp')
-rw-r--r--native/android/input.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/native/android/input.cpp b/native/android/input.cpp
index a231d8f153e7..812db0f1c507 100644
--- a/native/android/input.cpp
+++ b/native/android/input.cpp
@@ -295,6 +295,8 @@ int32_t AMotionEvent_getClassification(const AInputEvent* motion_event) {
return AMOTION_EVENT_CLASSIFICATION_AMBIGUOUS_GESTURE;
case android::MotionClassification::DEEP_PRESS:
return AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS;
+ case android::MotionClassification::TWO_FINGER_SWIPE:
+ return AMOTION_EVENT_CLASSIFICATION_TWO_FINGER_SWIPE;
}
}