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

Commit 48a8d287 authored by Arpit Singh's avatar Arpit Singh Committed by Automerger Merge Worker
Browse files

InputMapper refactor: Revert "fix touch issue on portrait reference" am:...

InputMapper refactor: Revert "fix touch issue on portrait reference" am: 2aae677f am: 191804c8 am: b4ccc1ec

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23316821



Change-Id: If5be1d90284beacfb7c3fd0fcfbcba028e61b947
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 1802a316 b4ccc1ec
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -504,9 +504,9 @@ std::vector<std::unique_ptr<InputMapper>> InputDevice::createMappers(
        classes.test(InputDeviceClass::TOUCH_MT) && !isSonyDualShock4Touchpad) {
        classes.test(InputDeviceClass::TOUCH_MT) && !isSonyDualShock4Touchpad) {
        mappers.push_back(createInputMapper<TouchpadInputMapper>(context, readerConfig));
        mappers.push_back(createInputMapper<TouchpadInputMapper>(context, readerConfig));
    } else if (classes.test(InputDeviceClass::TOUCH_MT)) {
    } else if (classes.test(InputDeviceClass::TOUCH_MT)) {
        mappers.push_back(std::make_unique<MultiTouchInputMapper>(context, readerConfig));
        mappers.push_back(createInputMapper<MultiTouchInputMapper>(context, readerConfig));
    } else if (classes.test(InputDeviceClass::TOUCH)) {
    } else if (classes.test(InputDeviceClass::TOUCH)) {
        mappers.push_back(std::make_unique<SingleTouchInputMapper>(context, readerConfig));
        mappers.push_back(createInputMapper<SingleTouchInputMapper>(context, readerConfig));
    }
    }


    // Joystick-like devices.
    // Joystick-like devices.
+2 −2
Original line number Original line Diff line number Diff line
@@ -27,8 +27,6 @@ public:
    friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext,
    friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext,
                                                const InputReaderConfiguration& readerConfig,
                                                const InputReaderConfiguration& readerConfig,
                                                Args... args);
                                                Args... args);
    explicit MultiTouchInputMapper(InputDeviceContext& deviceContext,
                                   const InputReaderConfiguration& readerConfig);


    ~MultiTouchInputMapper() override;
    ~MultiTouchInputMapper() override;


@@ -41,6 +39,8 @@ protected:
    bool hasStylus() const override;
    bool hasStylus() const override;


private:
private:
    explicit MultiTouchInputMapper(InputDeviceContext& deviceContext,
                                   const InputReaderConfiguration& readerConfig);
    // simulate_stylus_with_touch is a debug mode that converts all finger pointers reported by this
    // simulate_stylus_with_touch is a debug mode that converts all finger pointers reported by this
    // mapper's touchscreen into stylus pointers, and adds SOURCE_STYLUS to the input device.
    // mapper's touchscreen into stylus pointers, and adds SOURCE_STYLUS to the input device.
    // It is used to simulate stylus events for debugging and testing on a device that does not
    // It is used to simulate stylus events for debugging and testing on a device that does not
+2 −2
Original line number Original line Diff line number Diff line
@@ -27,8 +27,6 @@ public:
    friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext,
    friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext,
                                                const InputReaderConfiguration& readerConfig,
                                                const InputReaderConfiguration& readerConfig,
                                                Args... args);
                                                Args... args);
    explicit SingleTouchInputMapper(InputDeviceContext& deviceContext,
                                    const InputReaderConfiguration& readerConfig);


    ~SingleTouchInputMapper() override;
    ~SingleTouchInputMapper() override;


@@ -42,6 +40,8 @@ protected:


private:
private:
    SingleTouchMotionAccumulator mSingleTouchMotionAccumulator;
    SingleTouchMotionAccumulator mSingleTouchMotionAccumulator;
    explicit SingleTouchInputMapper(InputDeviceContext& deviceContext,
                                    const InputReaderConfiguration& readerConfig);
};
};


} // namespace android
} // namespace android