Add new NDK function definitions in input.h
This CL adds 2 new functions to get ActionButton and Classification from
a MotionEvent.
Test: atest android.view.cts.MotionEventTest
Bug: 213266814
Change-Id: Id264a5d110c6c65a7daae89194ab234f64832e13
diff --git a/include/input/Input.h b/include/input/Input.h
index e421dee..2837add 100644
--- a/include/input/Input.h
+++ b/include/input/Input.h
@@ -275,23 +275,21 @@
/**
* Classifications of the current gesture, if available.
- *
- * The following values must be kept in sync with MotionEvent.java
*/
enum class MotionClassification : uint8_t {
/**
* No classification is available.
*/
- NONE = 0,
+ NONE = AMOTION_EVENT_CLASSIFICATION_NONE,
/**
* Too early to classify the current gesture. Need more events. Look for changes in the
* upcoming motion events.
*/
- AMBIGUOUS_GESTURE = 1,
+ AMBIGUOUS_GESTURE = AMOTION_EVENT_CLASSIFICATION_AMBIGUOUS_GESTURE,
/**
* The current gesture likely represents a user intentionally exerting force on the touchscreen.
*/
- DEEP_PRESS = 2,
+ DEEP_PRESS = AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS,
};
/**