Expand fatal log for HOVER_MOVE
Add the entry information to the log to make it more useful.
Bug: 273376858
Test: none
Change-Id: I94aaf650acef638b9e189a6ebed1e7d92dc05cd6
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index 6e2f862..851f13c 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -626,7 +626,9 @@
touchedWindow.targetFlags = InputTarget::Flags::DISPATCH_AS_HOVER_ENTER;
} else {
// This pointer was already sent to the window. Use ACTION_HOVER_MOVE.
- LOG_ALWAYS_FATAL_IF(maskedAction != AMOTION_EVENT_ACTION_HOVER_MOVE);
+ if (CC_UNLIKELY(maskedAction != AMOTION_EVENT_ACTION_HOVER_MOVE)) {
+ LOG(FATAL) << "Expected ACTION_HOVER_MOVE instead of " << entry.getDescription();
+ }
touchedWindow.targetFlags = InputTarget::Flags::DISPATCH_AS_IS;
}
touchedWindow.pointerIds.set(pointerId);