Sync disabling of touchpad taps with hiding pointer
Due to an earlier refactor hiding cursor logic was moved to
pointer choreographer it caused disabling touchpad taps to be out or
sync.
This change consolidates these to ensure whenever mouse pointer is
hidden, touchpad tap is also disabled.
Test: atest inputflinger_tests
Bug: b/338652288
Flag: EXEMPT bugfix
Change-Id: I9faf7d68e5eebc5ca197688c96c661419334f0cf
diff --git a/services/inputflinger/reader/InputReader.cpp b/services/inputflinger/reader/InputReader.cpp
index ab13ad4..0073fd1 100644
--- a/services/inputflinger/reader/InputReader.cpp
+++ b/services/inputflinger/reader/InputReader.cpp
@@ -907,6 +907,12 @@
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);