GestureConverter: add finger count axis for multi-finger swipes
Consumers of multi-finger swipes (i.e. SysUI) previously had to wait
until the first MOVE event to find out how many fingers were swiping,
even though in the framework we knew this when sending the DOWN event.
Adding this as an axis on the DOWN event should let SysUI simplify their
code.
Bug: 283093437
Test: atest inputflinger_tests:GestureConverterTest
Test: modify InputDispatcher to send multi-finger swipes to apps too,
then check reported values in a test app
Change-Id: I34d1fdf096c49d7eb9b5d8ebd64427eb4e5db1f4
diff --git a/libs/input/InputEventLabels.cpp b/libs/input/InputEventLabels.cpp
index f99a7d6..1c7cc12 100644
--- a/libs/input/InputEventLabels.cpp
+++ b/libs/input/InputEventLabels.cpp
@@ -404,7 +404,8 @@
DEFINE_AXIS(GESTURE_Y_OFFSET), \
DEFINE_AXIS(GESTURE_SCROLL_X_DISTANCE), \
DEFINE_AXIS(GESTURE_SCROLL_Y_DISTANCE), \
- DEFINE_AXIS(GESTURE_PINCH_SCALE_FACTOR)
+ DEFINE_AXIS(GESTURE_PINCH_SCALE_FACTOR), \
+ DEFINE_AXIS(GESTURE_SWIPE_FINGER_COUNT)
// NOTE: If you add new LEDs here, you must also add them to Input.h
#define LEDS_SEQUENCE \