Loading services/inputflinger/include/InputReaderBase.h +3 −0 Original line number Diff line number Diff line Loading @@ -466,6 +466,9 @@ public: virtual void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs, int32_t deviceId) = 0; /* Sends the Info of gestures that happen on the touchpad. */ virtual void notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) = 0; /* Gets the keyboard layout for a particular input device. */ virtual std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay( const InputDeviceIdentifier& identifier, Loading services/inputflinger/reader/mapper/TouchpadInputMapper.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -480,6 +480,9 @@ void TouchpadInputMapper::consumeGesture(const Gesture* gesture) { return; } mGesturesToProcess.push_back(*gesture); if (mTouchpadHardwareStateNotificationsEnabled) { getPolicy()->notifyTouchpadGestureInfo(gesture->type, getDeviceId()); } } std::list<NotifyArgs> TouchpadInputMapper::processGestures(nsecs_t when, nsecs_t readTime) { Loading services/inputflinger/tests/FakeInputReaderPolicy.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,10 @@ void FakeInputReaderPolicy::notifyTouchpadHardwareState(const SelfContainedHardw mTouchpadHardwareStateNotified.notify_all(); } void FakeInputReaderPolicy::notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) { std::scoped_lock lock(mLock); } std::shared_ptr<KeyCharacterMap> FakeInputReaderPolicy::getKeyboardLayoutOverlay( const InputDeviceIdentifier&, const std::optional<KeyboardLayoutInfo>) { return nullptr; Loading services/inputflinger/tests/FakeInputReaderPolicy.h +1 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ private: void notifyInputDevicesChanged(const std::vector<InputDeviceInfo>& inputDevices) override; void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs, int32_t deviceId) override; void notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) override; std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay( const InputDeviceIdentifier&, const std::optional<KeyboardLayoutInfo>) override; std::string getDeviceAlias(const InputDeviceIdentifier&) override; Loading services/inputflinger/tests/fuzzers/MapperHelpers.h +1 −0 Original line number Diff line number Diff line Loading @@ -283,6 +283,7 @@ public: void notifyInputDevicesChanged(const std::vector<InputDeviceInfo>& inputDevices) override {} void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs, int32_t deviceId) override {} void notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) override {} std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay( const InputDeviceIdentifier& identifier, const std::optional<KeyboardLayoutInfo> layoutInfo) override { Loading Loading
services/inputflinger/include/InputReaderBase.h +3 −0 Original line number Diff line number Diff line Loading @@ -466,6 +466,9 @@ public: virtual void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs, int32_t deviceId) = 0; /* Sends the Info of gestures that happen on the touchpad. */ virtual void notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) = 0; /* Gets the keyboard layout for a particular input device. */ virtual std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay( const InputDeviceIdentifier& identifier, Loading
services/inputflinger/reader/mapper/TouchpadInputMapper.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -480,6 +480,9 @@ void TouchpadInputMapper::consumeGesture(const Gesture* gesture) { return; } mGesturesToProcess.push_back(*gesture); if (mTouchpadHardwareStateNotificationsEnabled) { getPolicy()->notifyTouchpadGestureInfo(gesture->type, getDeviceId()); } } std::list<NotifyArgs> TouchpadInputMapper::processGestures(nsecs_t when, nsecs_t readTime) { Loading
services/inputflinger/tests/FakeInputReaderPolicy.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,10 @@ void FakeInputReaderPolicy::notifyTouchpadHardwareState(const SelfContainedHardw mTouchpadHardwareStateNotified.notify_all(); } void FakeInputReaderPolicy::notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) { std::scoped_lock lock(mLock); } std::shared_ptr<KeyCharacterMap> FakeInputReaderPolicy::getKeyboardLayoutOverlay( const InputDeviceIdentifier&, const std::optional<KeyboardLayoutInfo>) { return nullptr; Loading
services/inputflinger/tests/FakeInputReaderPolicy.h +1 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ private: void notifyInputDevicesChanged(const std::vector<InputDeviceInfo>& inputDevices) override; void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs, int32_t deviceId) override; void notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) override; std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay( const InputDeviceIdentifier&, const std::optional<KeyboardLayoutInfo>) override; std::string getDeviceAlias(const InputDeviceIdentifier&) override; Loading
services/inputflinger/tests/fuzzers/MapperHelpers.h +1 −0 Original line number Diff line number Diff line Loading @@ -283,6 +283,7 @@ public: void notifyInputDevicesChanged(const std::vector<InputDeviceInfo>& inputDevices) override {} void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs, int32_t deviceId) override {} void notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) override {} std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay( const InputDeviceIdentifier& identifier, const std::optional<KeyboardLayoutInfo> layoutInfo) override { Loading