Loading services/inputflinger/include/InputReaderBase.h +2 −2 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ struct InputReaderConfiguration { // user's pointer speed setting, should be disabled for mice. This differs from // disabling acceleration via the 'mousePointerAccelerationEnabled' setting, where // the pointer speed setting still influences the scaling factor. std::set<ui::LogicalDisplayId> displaysWithMousePointerAccelerationDisabled; std::set<ui::LogicalDisplayId> displaysWithMouseScalingDisabled; // True if the connected mouse should exhibit pointer acceleration. If false, // a flat acceleration curve (linear scaling) is used, but the user's pointer Loading Loading @@ -282,7 +282,7 @@ struct InputReaderConfiguration { : virtualKeyQuietTime(0), defaultPointerDisplayId(ui::LogicalDisplayId::DEFAULT), mousePointerSpeed(0), displaysWithMousePointerAccelerationDisabled(), displaysWithMouseScalingDisabled(), mousePointerAccelerationEnabled(true), pointerVelocityControlParameters(1.0f, 500.0f, 3000.0f, static_cast<float>( Loading services/inputflinger/reader/mapper/CursorInputMapper.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -484,7 +484,7 @@ void CursorInputMapper::configureOnChangePointerSpeed(const InputReaderConfigura return; } bool disableAllScaling = config.displaysWithMousePointerAccelerationDisabled.count( bool disableAllScaling = config.displaysWithMouseScalingDisabled.count( mDisplayId.value_or(ui::LogicalDisplayId::INVALID)) != 0; mPointerVelocityControl.setAccelerationEnabled(!disableAllScaling); Loading services/inputflinger/tests/CursorInputMapper_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1078,7 +1078,7 @@ TEST_F(CursorInputMapperUnitTest, ConfigureAccelerationWithAssociatedViewport) { ASSERT_GT(coords.getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y), 20.f); // Disable acceleration for the display, and verify that acceleration is no longer applied. mReaderConfiguration.displaysWithMousePointerAccelerationDisabled.emplace(DISPLAY_ID); mReaderConfiguration.displaysWithMouseScalingDisabled.emplace(DISPLAY_ID); args += mMapper->reconfigure(ARBITRARY_TIME, mReaderConfiguration, InputReaderConfiguration::Change::POINTER_SPEED); args.clear(); Loading @@ -1097,7 +1097,7 @@ TEST_F(CursorInputMapperUnitTest, ConfigureAccelerationOnDisplayChange) { DisplayViewport primaryViewport = createPrimaryViewport(ui::Rotation::Rotation0); mReaderConfiguration.setDisplayViewports({primaryViewport}); // Disable acceleration for the display. mReaderConfiguration.displaysWithMousePointerAccelerationDisabled.emplace(DISPLAY_ID); mReaderConfiguration.displaysWithMouseScalingDisabled.emplace(DISPLAY_ID); // Don't associate the device with the display yet. EXPECT_CALL((*mDevice), getAssociatedViewport).WillRepeatedly(Return(std::nullopt)); Loading Loading
services/inputflinger/include/InputReaderBase.h +2 −2 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ struct InputReaderConfiguration { // user's pointer speed setting, should be disabled for mice. This differs from // disabling acceleration via the 'mousePointerAccelerationEnabled' setting, where // the pointer speed setting still influences the scaling factor. std::set<ui::LogicalDisplayId> displaysWithMousePointerAccelerationDisabled; std::set<ui::LogicalDisplayId> displaysWithMouseScalingDisabled; // True if the connected mouse should exhibit pointer acceleration. If false, // a flat acceleration curve (linear scaling) is used, but the user's pointer Loading Loading @@ -282,7 +282,7 @@ struct InputReaderConfiguration { : virtualKeyQuietTime(0), defaultPointerDisplayId(ui::LogicalDisplayId::DEFAULT), mousePointerSpeed(0), displaysWithMousePointerAccelerationDisabled(), displaysWithMouseScalingDisabled(), mousePointerAccelerationEnabled(true), pointerVelocityControlParameters(1.0f, 500.0f, 3000.0f, static_cast<float>( Loading
services/inputflinger/reader/mapper/CursorInputMapper.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -484,7 +484,7 @@ void CursorInputMapper::configureOnChangePointerSpeed(const InputReaderConfigura return; } bool disableAllScaling = config.displaysWithMousePointerAccelerationDisabled.count( bool disableAllScaling = config.displaysWithMouseScalingDisabled.count( mDisplayId.value_or(ui::LogicalDisplayId::INVALID)) != 0; mPointerVelocityControl.setAccelerationEnabled(!disableAllScaling); Loading
services/inputflinger/tests/CursorInputMapper_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1078,7 +1078,7 @@ TEST_F(CursorInputMapperUnitTest, ConfigureAccelerationWithAssociatedViewport) { ASSERT_GT(coords.getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y), 20.f); // Disable acceleration for the display, and verify that acceleration is no longer applied. mReaderConfiguration.displaysWithMousePointerAccelerationDisabled.emplace(DISPLAY_ID); mReaderConfiguration.displaysWithMouseScalingDisabled.emplace(DISPLAY_ID); args += mMapper->reconfigure(ARBITRARY_TIME, mReaderConfiguration, InputReaderConfiguration::Change::POINTER_SPEED); args.clear(); Loading @@ -1097,7 +1097,7 @@ TEST_F(CursorInputMapperUnitTest, ConfigureAccelerationOnDisplayChange) { DisplayViewport primaryViewport = createPrimaryViewport(ui::Rotation::Rotation0); mReaderConfiguration.setDisplayViewports({primaryViewport}); // Disable acceleration for the display. mReaderConfiguration.displaysWithMousePointerAccelerationDisabled.emplace(DISPLAY_ID); mReaderConfiguration.displaysWithMouseScalingDisabled.emplace(DISPLAY_ID); // Don't associate the device with the display yet. EXPECT_CALL((*mDevice), getAssociatedViewport).WillRepeatedly(Return(std::nullopt)); Loading