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
diff --git a/services/inputflinger/InputManager.h b/services/inputflinger/InputManager.h
index 586097f..0158441 100644
--- a/services/inputflinger/InputManager.h
+++ b/services/inputflinger/InputManager.h
@@ -100,6 +100,8 @@
virtual void registerInputChannel(const sp<InputChannel>& channel);
virtual void unregisterInputChannel(const sp<InputChannel>& channel);
+ void setMotionClassifierEnabled(bool enabled);
+
private:
sp<InputReaderInterface> mReader;