Loading services/inputflinger/PointerChoreographer.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -202,6 +202,7 @@ void PointerChoreographer::fadeMouseCursorOnKeyPress(const android::NotifyKeyArg } auto it = mMousePointersByDisplay.find(targetDisplay); if (it != mMousePointersByDisplay.end()) { mPolicy.notifyMouseCursorFadedOnTyping(); it->second->fade(PointerControllerInterface::Transition::GRADUAL); } } Loading services/inputflinger/include/InputReaderBase.h +3 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,9 @@ public: * Returns ReservedInputDeviceId::INVALID_INPUT_DEVICE_ID if no device has been used since boot. */ virtual DeviceId getLastUsedInputDeviceId() = 0; /* Notifies that mouse cursor faded due to typing. */ virtual void notifyMouseCursorFadedOnTyping() = 0; }; // --- TouchAffineTransformation --- Loading services/inputflinger/include/PointerChoreographerPolicyInterface.h +3 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,9 @@ public: /* Returns true if any InputConnection is currently active. */ virtual bool isInputMethodConnectionActive() = 0; /* Notifies that mouse cursor faded due to typing. */ virtual void notifyMouseCursorFadedOnTyping() = 0; }; } // namespace android services/inputflinger/reader/InputReader.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -907,6 +907,12 @@ DeviceId InputReader::getLastUsedInputDeviceId() { return mLastUsedDeviceId; } void InputReader::notifyMouseCursorFadedOnTyping() { std::scoped_lock _l(mLock); // disable touchpad taps when cursor has faded due to typing mPreventingTouchpadTaps = true; } void InputReader::dump(std::string& dump) { std::scoped_lock _l(mLock); Loading services/inputflinger/reader/include/InputReader.h +3 −1 Original line number Diff line number Diff line Loading @@ -118,6 +118,8 @@ public: DeviceId getLastUsedInputDeviceId() override; void notifyMouseCursorFadedOnTyping() override; protected: // These members are protected so they can be instrumented by test cases. virtual std::shared_ptr<InputDevice> createDeviceLocked(nsecs_t when, int32_t deviceId, Loading Loading @@ -199,7 +201,7 @@ private: std::unordered_map<std::shared_ptr<InputDevice>, std::vector<int32_t> /*eventHubId*/> mDeviceToEventHubIdsMap GUARDED_BY(mLock); // true if tap-to-click on touchpad currently disabled // true if tap-to-click on touchpad is currently disabled bool mPreventingTouchpadTaps GUARDED_BY(mLock){false}; // records timestamp of the last key press on the physical keyboard Loading Loading
services/inputflinger/PointerChoreographer.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -202,6 +202,7 @@ void PointerChoreographer::fadeMouseCursorOnKeyPress(const android::NotifyKeyArg } auto it = mMousePointersByDisplay.find(targetDisplay); if (it != mMousePointersByDisplay.end()) { mPolicy.notifyMouseCursorFadedOnTyping(); it->second->fade(PointerControllerInterface::Transition::GRADUAL); } } Loading
services/inputflinger/include/InputReaderBase.h +3 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,9 @@ public: * Returns ReservedInputDeviceId::INVALID_INPUT_DEVICE_ID if no device has been used since boot. */ virtual DeviceId getLastUsedInputDeviceId() = 0; /* Notifies that mouse cursor faded due to typing. */ virtual void notifyMouseCursorFadedOnTyping() = 0; }; // --- TouchAffineTransformation --- Loading
services/inputflinger/include/PointerChoreographerPolicyInterface.h +3 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,9 @@ public: /* Returns true if any InputConnection is currently active. */ virtual bool isInputMethodConnectionActive() = 0; /* Notifies that mouse cursor faded due to typing. */ virtual void notifyMouseCursorFadedOnTyping() = 0; }; } // namespace android
services/inputflinger/reader/InputReader.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -907,6 +907,12 @@ DeviceId InputReader::getLastUsedInputDeviceId() { return mLastUsedDeviceId; } void InputReader::notifyMouseCursorFadedOnTyping() { std::scoped_lock _l(mLock); // disable touchpad taps when cursor has faded due to typing mPreventingTouchpadTaps = true; } void InputReader::dump(std::string& dump) { std::scoped_lock _l(mLock); Loading
services/inputflinger/reader/include/InputReader.h +3 −1 Original line number Diff line number Diff line Loading @@ -118,6 +118,8 @@ public: DeviceId getLastUsedInputDeviceId() override; void notifyMouseCursorFadedOnTyping() override; protected: // These members are protected so they can be instrumented by test cases. virtual std::shared_ptr<InputDevice> createDeviceLocked(nsecs_t when, int32_t deviceId, Loading Loading @@ -199,7 +201,7 @@ private: std::unordered_map<std::shared_ptr<InputDevice>, std::vector<int32_t> /*eventHubId*/> mDeviceToEventHubIdsMap GUARDED_BY(mLock); // true if tap-to-click on touchpad currently disabled // true if tap-to-click on touchpad is currently disabled bool mPreventingTouchpadTaps GUARDED_BY(mLock){false}; // records timestamp of the last key press on the physical keyboard Loading