Loading services/inputflinger/reader/mapper/TouchInputMapper.cpp +3 −9 Original line number Diff line number Diff line Loading @@ -3476,7 +3476,7 @@ std::list<NotifyArgs> TouchInputMapper::dispatchPointerMouse(nsecs_t when, nsecs } return dispatchPointerSimple(when, readTime, policyFlags, down, hovering, ui::LogicalDisplayId::INVALID); getAssociatedDisplayId().value_or(ui::LogicalDisplayId::INVALID)); } std::list<NotifyArgs> TouchInputMapper::abortPointerMouse(nsecs_t when, nsecs_t readTime, Loading Loading @@ -3967,14 +3967,8 @@ bool TouchInputMapper::markSupportedKeyCodes(uint32_t sourceMask, } std::optional<ui::LogicalDisplayId> TouchInputMapper::getAssociatedDisplayId() { if (mParameters.hasAssociatedDisplay) { if (mDeviceMode == DeviceMode::POINTER) { return ui::LogicalDisplayId::INVALID; } else { return std::make_optional(mViewport.displayId); } } return std::nullopt; return mParameters.hasAssociatedDisplay ? std::make_optional(mViewport.displayId) : std::nullopt; } } // namespace android services/inputflinger/tests/InputReader_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -7534,7 +7534,7 @@ TEST_F(MultiTouchInputMapperTest, Process_Pointer_ShouldHandleDisplayId) { ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs)); ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action); ASSERT_EQ(ui::LogicalDisplayId::INVALID, motionArgs.displayId); ASSERT_EQ(DISPLAY_ID, motionArgs.displayId); } /** Loading Loading
services/inputflinger/reader/mapper/TouchInputMapper.cpp +3 −9 Original line number Diff line number Diff line Loading @@ -3476,7 +3476,7 @@ std::list<NotifyArgs> TouchInputMapper::dispatchPointerMouse(nsecs_t when, nsecs } return dispatchPointerSimple(when, readTime, policyFlags, down, hovering, ui::LogicalDisplayId::INVALID); getAssociatedDisplayId().value_or(ui::LogicalDisplayId::INVALID)); } std::list<NotifyArgs> TouchInputMapper::abortPointerMouse(nsecs_t when, nsecs_t readTime, Loading Loading @@ -3967,14 +3967,8 @@ bool TouchInputMapper::markSupportedKeyCodes(uint32_t sourceMask, } std::optional<ui::LogicalDisplayId> TouchInputMapper::getAssociatedDisplayId() { if (mParameters.hasAssociatedDisplay) { if (mDeviceMode == DeviceMode::POINTER) { return ui::LogicalDisplayId::INVALID; } else { return std::make_optional(mViewport.displayId); } } return std::nullopt; return mParameters.hasAssociatedDisplay ? std::make_optional(mViewport.displayId) : std::nullopt; } } // namespace android
services/inputflinger/tests/InputReader_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -7534,7 +7534,7 @@ TEST_F(MultiTouchInputMapperTest, Process_Pointer_ShouldHandleDisplayId) { ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs)); ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action); ASSERT_EQ(ui::LogicalDisplayId::INVALID, motionArgs.displayId); ASSERT_EQ(DISPLAY_ID, motionArgs.displayId); } /** Loading