From 2800fb0c6b56711c6daf70491270dbea89fbf660 Mon Sep 17 00:00:00 2001 From: Harry Cutts Date: Thu, 15 Sep 2022 13:49:23 +0000 Subject: Use TWO_FINGER_SWIPE classification for touchpad scroll events This allows apps to distinguish the fake finger created for touchpad scrolling from an actual finger. Bug: 246758376 Test: add classification to InputDispatcher's outbound event logs and check the new value is used when scrolling Change-Id: Ia90f9984e75ad6fde2d0e42628ab42eab371b7a5 --- include/android/input.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/android/input.h') diff --git a/include/android/input.h b/include/android/input.h index 8cd9e9551a..7080386df7 100644 --- a/include/android/input.h +++ b/include/android/input.h @@ -840,6 +840,12 @@ enum AMotionClassification : uint32_t { * This classification type should be used to accelerate the long press behaviour. */ AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS = 2, + /** + * Classification constant: touchpad two-finger swipe. + * + * The current event stream represents the user swiping with two fingers on a touchpad. + */ + AMOTION_EVENT_CLASSIFICATION_TWO_FINGER_SWIPE = 3, }; /** -- cgit v1.2.3-59-g8ed1b