Propagate MotionClassification to InputDispatcher
We added MotionClassification to MotionEvent and NotifyMotionArgs, but
the two have not yet been connected. Connect them here, to ensure that
apps can receive the classification.
Bug: 111480215
Test: atest -a libinput_tests inputflinger_tests
Change-Id: I67dda22d9ee8a2d89abf40dbd01200ec37a65737
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp
index db86c8e..9fd25f9 100644
--- a/libs/input/Input.cpp
+++ b/libs/input/Input.cpp
@@ -29,6 +29,17 @@
namespace android {
+const char* motionClassificationToString(MotionClassification classification) {
+ switch (classification) {
+ case MotionClassification::NONE:
+ return "NONE";
+ case MotionClassification::AMBIGUOUS_GESTURE:
+ return "AMBIGUOUS_GESTURE";
+ case MotionClassification::DEEP_PRESS:
+ return "DEEP_PRESS";
+ }
+}
+
// --- InputEvent ---
void InputEvent::initialize(int32_t deviceId, int32_t source, int32_t displayId) {