Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13063aa7 authored by Harry Cutts's avatar Harry Cutts
Browse files

Revert "Disable new touchpad stack for Sony gamepads"

Revert submission 21018993

Reason for revert: Causes a failure in DeviceBootTest (see b/266216942).

Reverted changes: /q/submissionid:21018993

Change-Id: Iecea5aeb1c567e936bf5c7c793c5833a086664cb
parent e60fa698
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -210,14 +210,8 @@ void InputDevice::addEventHubDevice(int32_t eventHubId, bool populateMappers) {
    // Touchscreens and touchpad devices.
    static const bool ENABLE_TOUCHPAD_GESTURES_LIBRARY =
            sysprop::InputProperties::enable_touchpad_gestures_library().value_or(false);
    // TODO(b/246587538): Fix the new touchpad stack for Sony DualShock 4 (5c4, 9cc) and DualSense
    // (ce6) touchpads, or at least load this setting from the IDC file.
    const InputDeviceIdentifier& identifier = getDeviceInfo().getIdentifier();
    const bool isSonyGamepadTouchpad = identifier.vendor == 0x054c &&
            (identifier.product == 0x05c4 || identifier.product == 0x09cc ||
             identifier.product == 0x0ce6);
    if (ENABLE_TOUCHPAD_GESTURES_LIBRARY && classes.test(InputDeviceClass::TOUCHPAD) &&
        classes.test(InputDeviceClass::TOUCH_MT) && !isSonyGamepadTouchpad) {
        classes.test(InputDeviceClass::TOUCH_MT)) {
        mappers.push_back(std::make_unique<TouchpadInputMapper>(*contextPtr));
    } else if (classes.test(InputDeviceClass::TOUCH_MT)) {
        mappers.push_back(std::make_unique<MultiTouchInputMapper>(*contextPtr));