diff options
| -rw-r--r-- | services/inputflinger/reader/mapper/TouchInputMapper.cpp | 7 | ||||
| -rw-r--r-- | services/inputflinger/reader/mapper/TouchInputMapper.h | 1 | ||||
| -rw-r--r-- | services/inputflinger/tests/InputReader_test.cpp | 19 |
3 files changed, 0 insertions, 27 deletions
diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.cpp b/services/inputflinger/reader/mapper/TouchInputMapper.cpp index 17ee54f528..924c4d0ba5 100644 --- a/services/inputflinger/reader/mapper/TouchInputMapper.cpp +++ b/services/inputflinger/reader/mapper/TouchInputMapper.cpp @@ -441,11 +441,6 @@ void TouchInputMapper::configureParameters() { } else if (getDeviceContext().hasInputProperty(INPUT_PROP_POINTER)) { // The device is a pointing device like a track pad. mParameters.deviceType = Parameters::DeviceType::POINTER; - } else if (getDeviceContext().hasRelativeAxis(REL_X) || - getDeviceContext().hasRelativeAxis(REL_Y)) { - // The device is a cursor device with a touch pad attached. - // By default don't use the touch pad to move the pointer. - mParameters.deviceType = Parameters::DeviceType::TOUCH_PAD; } else { // The device is a touch pad of unknown purpose. mParameters.deviceType = Parameters::DeviceType::POINTER; @@ -458,8 +453,6 @@ void TouchInputMapper::configureParameters() { deviceTypeString)) { if (deviceTypeString == "touchScreen") { mParameters.deviceType = Parameters::DeviceType::TOUCH_SCREEN; - } else if (deviceTypeString == "touchPad") { - mParameters.deviceType = Parameters::DeviceType::TOUCH_PAD; } else if (deviceTypeString == "touchNavigation") { mParameters.deviceType = Parameters::DeviceType::TOUCH_NAVIGATION; } else if (deviceTypeString == "pointer") { diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.h b/services/inputflinger/reader/mapper/TouchInputMapper.h index 3cb11aa04e..cdf1c7d032 100644 --- a/services/inputflinger/reader/mapper/TouchInputMapper.h +++ b/services/inputflinger/reader/mapper/TouchInputMapper.h @@ -197,7 +197,6 @@ protected: struct Parameters { enum class DeviceType { TOUCH_SCREEN, - TOUCH_PAD, TOUCH_NAVIGATION, POINTER, diff --git a/services/inputflinger/tests/InputReader_test.cpp b/services/inputflinger/tests/InputReader_test.cpp index a0e61927d3..24721de75b 100644 --- a/services/inputflinger/tests/InputReader_test.cpp +++ b/services/inputflinger/tests/InputReader_test.cpp @@ -5325,25 +5325,6 @@ TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsNotSpecifiedAndNot ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper.getSources()); } -TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsNotSpecifiedAndIsACursor_ReturnsTouchPad) { - mFakeEventHub->addRelativeAxis(EVENTHUB_ID, REL_X); - mFakeEventHub->addRelativeAxis(EVENTHUB_ID, REL_Y); - prepareButtons(); - prepareAxes(POSITION); - SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); - - ASSERT_EQ(AINPUT_SOURCE_TOUCHPAD, mapper.getSources()); -} - -TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsTouchPad_ReturnsTouchPad) { - prepareButtons(); - prepareAxes(POSITION); - addConfigurationProperty("touch.deviceType", "touchPad"); - SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); - - ASSERT_EQ(AINPUT_SOURCE_TOUCHPAD, mapper.getSources()); -} - TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsTouchScreen_ReturnsTouchScreen) { prepareButtons(); prepareAxes(POSITION); |