Add full action printout to MotionEvent
Currently, not all actions are being printed in the input dump. This
results in hard-to-debug cases like the hover issue with multi-finger
operation before screen off.
Add printouts for all known action values, and add a number printout in
case an invalid value is received.
Bug: 169785626
Bug: 164506345
Test: adb shell dumpsys input
Change-Id: I885bf311eb28cca153887ebb382528927a736041
diff --git a/services/inputflinger/dispatcher/Entry.cpp b/services/inputflinger/dispatcher/Entry.cpp
index 5103b4c..29df00b 100644
--- a/services/inputflinger/dispatcher/Entry.cpp
+++ b/services/inputflinger/dispatcher/Entry.cpp
@@ -207,10 +207,10 @@
"buttonState=0x%08x, "
"classification=%s, edgeFlags=0x%08x, xPrecision=%.1f, yPrecision=%.1f, "
"xCursorPosition=%0.1f, yCursorPosition=%0.1f, pointers=[",
- deviceId, eventTime, source, displayId, MotionEvent::actionToString(action),
- actionButton, flags, metaState, buttonState,
- motionClassificationToString(classification), edgeFlags, xPrecision,
- yPrecision, xCursorPosition, yCursorPosition);
+ deviceId, eventTime, source, displayId,
+ MotionEvent::actionToString(action).c_str(), actionButton, flags, metaState,
+ buttonState, motionClassificationToString(classification), edgeFlags,
+ xPrecision, yPrecision, xCursorPosition, yCursorPosition);
for (uint32_t i = 0; i < pointerCount; i++) {
if (i) {