Loading services/inputflinger/dispatcher/InputDispatcher.cpp +4 −9 Original line number Diff line number Diff line Loading @@ -2330,16 +2330,11 @@ std::vector<InputTarget> InputDispatcher::findTouchedWindowTargetsLocked( continue; } if (isHoverAction) { if (maskedAction == AMOTION_EVENT_ACTION_HOVER_ENTER || maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE) { const int32_t pointerId = entry.pointerProperties[0].id; if (maskedAction == AMOTION_EVENT_ACTION_HOVER_EXIT) { // Pointer left. Remove it tempTouchState.removeHoveringPointer(entry.deviceId, pointerId); } else { // The "windowHandle" is the target of this hovering pointer. tempTouchState.addHoveringPointerToWindow(windowHandle, entry.deviceId, pointerId); } tempTouchState.addHoveringPointerToWindow(windowHandle, entry.deviceId, pointerId); } // Set target flags. Loading services/inputflinger/tests/InputDispatcher_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -3957,6 +3957,7 @@ TEST_F(InputDispatcherDisplayProjectionTest, WindowGetsEventsInCorrectCoordinate 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. Loading Loading
services/inputflinger/dispatcher/InputDispatcher.cpp +4 −9 Original line number Diff line number Diff line Loading @@ -2330,16 +2330,11 @@ std::vector<InputTarget> InputDispatcher::findTouchedWindowTargetsLocked( continue; } if (isHoverAction) { if (maskedAction == AMOTION_EVENT_ACTION_HOVER_ENTER || maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE) { const int32_t pointerId = entry.pointerProperties[0].id; if (maskedAction == AMOTION_EVENT_ACTION_HOVER_EXIT) { // Pointer left. Remove it tempTouchState.removeHoveringPointer(entry.deviceId, pointerId); } else { // The "windowHandle" is the target of this hovering pointer. tempTouchState.addHoveringPointerToWindow(windowHandle, entry.deviceId, pointerId); } tempTouchState.addHoveringPointerToWindow(windowHandle, entry.deviceId, pointerId); } // Set target flags. Loading
services/inputflinger/tests/InputDispatcher_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -3957,6 +3957,7 @@ TEST_F(InputDispatcherDisplayProjectionTest, WindowGetsEventsInCorrectCoordinate 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. Loading