Loading services/inputflinger/include/InputReaderBase.h +4 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,9 @@ struct InputReaderConfiguration { // True to enable tap dragging on touchpads. bool touchpadTapDraggingEnabled; // True if hardware state update notifications should be sent to the policy. bool shouldNotifyTouchpadHardwareState; // True to enable a zone on the right-hand side of touchpads where clicks will be turned into // context (a.k.a. "right") clicks. bool touchpadRightClickZoneEnabled; Loading Loading @@ -268,6 +271,7 @@ struct InputReaderConfiguration { touchpadNaturalScrollingEnabled(true), touchpadTapToClickEnabled(true), touchpadTapDraggingEnabled(false), shouldNotifyTouchpadHardwareState(false), touchpadRightClickZoneEnabled(false), stylusButtonMotionEventsEnabled(true), stylusPointerIconEnabled(false) {} Loading services/inputflinger/reader/mapper/TouchpadInputMapper.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -372,6 +372,7 @@ std::list<NotifyArgs> TouchpadInputMapper::reconfigure(nsecs_t when, .setBoolValues({config.touchpadTapDraggingEnabled}); mPropertyProvider.getProperty("Button Right Click Zone Enable") .setBoolValues({config.touchpadRightClickZoneEnabled}); mTouchpadHardwareStateNotificationsEnabled = config.shouldNotifyTouchpadHardwareState; } std::list<NotifyArgs> out; if ((!changes.any() && config.pointerCaptureRequest.isEnable()) || Loading Loading @@ -421,6 +422,11 @@ std::list<NotifyArgs> TouchpadInputMapper::process(const RawEvent& rawEvent) { } std::optional<SelfContainedHardwareState> state = mStateConverter.processRawEvent(rawEvent); if (state) { if (mTouchpadHardwareStateNotificationsEnabled) { // TODO(b/286551975): Notify policy of the touchpad hardware state. LOG(DEBUG) << "Notify touchpad hardware state here!"; } updatePalmDetectionMetrics(); return sendHardwareState(rawEvent.when, rawEvent.readTime, *state); } else { Loading services/inputflinger/reader/mapper/TouchpadInputMapper.h +4 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,10 @@ private: std::optional<ui::LogicalDisplayId> mDisplayId; nsecs_t mGestureStartTime{0}; // True if hardware state update notifications is available for usage based on its feature flag // and settings value. bool mTouchpadHardwareStateNotificationsEnabled = false; }; } // namespace android Loading
services/inputflinger/include/InputReaderBase.h +4 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,9 @@ struct InputReaderConfiguration { // True to enable tap dragging on touchpads. bool touchpadTapDraggingEnabled; // True if hardware state update notifications should be sent to the policy. bool shouldNotifyTouchpadHardwareState; // True to enable a zone on the right-hand side of touchpads where clicks will be turned into // context (a.k.a. "right") clicks. bool touchpadRightClickZoneEnabled; Loading Loading @@ -268,6 +271,7 @@ struct InputReaderConfiguration { touchpadNaturalScrollingEnabled(true), touchpadTapToClickEnabled(true), touchpadTapDraggingEnabled(false), shouldNotifyTouchpadHardwareState(false), touchpadRightClickZoneEnabled(false), stylusButtonMotionEventsEnabled(true), stylusPointerIconEnabled(false) {} Loading
services/inputflinger/reader/mapper/TouchpadInputMapper.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -372,6 +372,7 @@ std::list<NotifyArgs> TouchpadInputMapper::reconfigure(nsecs_t when, .setBoolValues({config.touchpadTapDraggingEnabled}); mPropertyProvider.getProperty("Button Right Click Zone Enable") .setBoolValues({config.touchpadRightClickZoneEnabled}); mTouchpadHardwareStateNotificationsEnabled = config.shouldNotifyTouchpadHardwareState; } std::list<NotifyArgs> out; if ((!changes.any() && config.pointerCaptureRequest.isEnable()) || Loading Loading @@ -421,6 +422,11 @@ std::list<NotifyArgs> TouchpadInputMapper::process(const RawEvent& rawEvent) { } std::optional<SelfContainedHardwareState> state = mStateConverter.processRawEvent(rawEvent); if (state) { if (mTouchpadHardwareStateNotificationsEnabled) { // TODO(b/286551975): Notify policy of the touchpad hardware state. LOG(DEBUG) << "Notify touchpad hardware state here!"; } updatePalmDetectionMetrics(); return sendHardwareState(rawEvent.when, rawEvent.readTime, *state); } else { Loading
services/inputflinger/reader/mapper/TouchpadInputMapper.h +4 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,10 @@ private: std::optional<ui::LogicalDisplayId> mDisplayId; nsecs_t mGestureStartTime{0}; // True if hardware state update notifications is available for usage based on its feature flag // and settings value. bool mTouchpadHardwareStateNotificationsEnabled = false; }; } // namespace android