summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputManager.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2020-03-19 11:55:01 -0700
committer Siarhei Vishniakou <svv@google.com> 2020-03-21 18:24:48 +0000
commitc60da19f2a012a15971dcd8f4fa3b7c22a90a670 (patch)
tree92e0f47ddbff00f1534d014c6fd5c996efe8d266 /services/inputflinger/InputManager.cpp
parentf08d9c835f9e422e34f19b0ed779cea1ec983105 (diff)
Disable deep press when long press timeout is long
If the user sets the long press timeout to anything > default value, then we should disable deep press. That means, if the user is triggering long press too easily, it is likely that the user will trigger deep press too easily as well. To prevent unwanted long press invocations, we disable deep press in such situations. Bug: 148311342 Test: Add logging to both cases where deep press is enabled and disabled. Go to accessibility -> touch & hold delay, and change the value. Ensure that the logging matches expectation (short -> enable, medium/long -> disable). The state should persist across the reboot. Change-Id: Ic631c684609c4436e9eaa6f9389939c5a6e4e1cd Merged-In: Ic631c684609c4436e9eaa6f9389939c5a6e4e1cd (cherry picked from commit c9ac19eb3d3c3f185fea95906541249dd4c3baf8)
Diffstat (limited to 'services/inputflinger/InputManager.cpp')
-rw-r--r--services/inputflinger/InputManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp
index c7c61cf1ef..fc771a2c58 100644
--- a/services/inputflinger/InputManager.cpp
+++ b/services/inputflinger/InputManager.cpp
@@ -132,4 +132,8 @@ void InputManager::unregisterInputChannel(const sp<InputChannel>& channel) {
mDispatcher->unregisterInputChannel(channel);
}
+void InputManager::setMotionClassifierEnabled(bool enabled) {
+ mClassifier->setMotionClassifierEnabled(enabled);
+}
+
} // namespace android