Loading services/inputflinger/reader/mapper/TouchInputMapper.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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") { Loading services/inputflinger/reader/mapper/TouchInputMapper.h +0 −1 Original line number Diff line number Diff line Loading @@ -197,7 +197,6 @@ protected: struct Parameters { enum class DeviceType { TOUCH_SCREEN, TOUCH_PAD, TOUCH_NAVIGATION, POINTER, Loading services/inputflinger/tests/InputReader_test.cpp +0 −19 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
services/inputflinger/reader/mapper/TouchInputMapper.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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") { Loading
services/inputflinger/reader/mapper/TouchInputMapper.h +0 −1 Original line number Diff line number Diff line Loading @@ -197,7 +197,6 @@ protected: struct Parameters { enum class DeviceType { TOUCH_SCREEN, TOUCH_PAD, TOUCH_NAVIGATION, POINTER, Loading
services/inputflinger/tests/InputReader_test.cpp +0 −19 Original line number Diff line number Diff line Loading @@ -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); Loading