Skip to content
Snippets Groups Projects
Commit 3fd805e8 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou Committed by Android Build Coastguard Worker
Browse files

Revert "InputMapper refactor: Revert "fix touch issue on portrai..."

Revert submission 23316821

Reason for revert: breaks touch on some devices b/284203485

Reverted changes: /q/submissionid:23316821
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:342e1dd013c4c5f51a15222d5b112fb14583a636)
Merged-In: Ic4537a645d710a900d6a3b9328bd6489baedbb1d
Change-Id: Ic4537a645d710a900d6a3b9328bd6489baedbb1d
parent c28fe976
No related branches found
No related tags found
No related merge requests found
......@@ -504,9 +504,9 @@ std::vector<std::unique_ptr<InputMapper>> InputDevice::createMappers(
classes.test(InputDeviceClass::TOUCH_MT) && !isSonyDualShock4Touchpad) {
mappers.push_back(createInputMapper<TouchpadInputMapper>(context, readerConfig));
} else if (classes.test(InputDeviceClass::TOUCH_MT)) {
mappers.push_back(createInputMapper<MultiTouchInputMapper>(context, readerConfig));
mappers.push_back(std::make_unique<MultiTouchInputMapper>(context, readerConfig));
} else if (classes.test(InputDeviceClass::TOUCH)) {
mappers.push_back(createInputMapper<SingleTouchInputMapper>(context, readerConfig));
mappers.push_back(std::make_unique<SingleTouchInputMapper>(context, readerConfig));
}
// Joystick-like devices.
......
......@@ -27,6 +27,8 @@ public:
friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext,
const InputReaderConfiguration& readerConfig,
Args... args);
explicit MultiTouchInputMapper(InputDeviceContext& deviceContext,
const InputReaderConfiguration& readerConfig);
~MultiTouchInputMapper() override;
......@@ -39,8 +41,6 @@ protected:
bool hasStylus() const override;
private:
explicit MultiTouchInputMapper(InputDeviceContext& deviceContext,
const InputReaderConfiguration& readerConfig);
// 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.
// It is used to simulate stylus events for debugging and testing on a device that does not
......
......@@ -27,6 +27,8 @@ public:
friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext,
const InputReaderConfiguration& readerConfig,
Args... args);
explicit SingleTouchInputMapper(InputDeviceContext& deviceContext,
const InputReaderConfiguration& readerConfig);
~SingleTouchInputMapper() override;
......@@ -40,8 +42,6 @@ protected:
private:
SingleTouchMotionAccumulator mSingleTouchMotionAccumulator;
explicit SingleTouchInputMapper(InputDeviceContext& deviceContext,
const InputReaderConfiguration& readerConfig);
};
} // namespace android
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment