Simplify hovering pointer condition
The hovering pointers are already getting cleared earlier in the
function (the call is 'tempTouchState.clearHoveringPointers();').
Therefore, the code path for "removeHoveringPointer" in response to
ACTION_HOVER_EXIT is never hit.
In this CL, we simplify this condition for clarity.
Bug: 273376858
Test: presubmit
Change-Id: Ifaa3b07cb8398a1a5715d6ce07c744a3bd5e7af5
diff --git a/services/inputflinger/tests/InputDispatcher_test.cpp b/services/inputflinger/tests/InputDispatcher_test.cpp
index b3c5095..f92b3a3 100644
--- a/services/inputflinger/tests/InputDispatcher_test.cpp
+++ b/services/inputflinger/tests/InputDispatcher_test.cpp
@@ -3957,6 +3957,7 @@
firstWindow->assertNoEvents();
const MotionEvent* event = secondWindow->consumeMotion();
+ ASSERT_NE(nullptr, event);
EXPECT_EQ(AMOTION_EVENT_ACTION_DOWN, event->getAction());
// Ensure that the events from the "getRaw" API are in logical display coordinates.