Add configuration for disabling stylus button motion events
This adds an option for disabling stylus buttons from being reported as
part of a motion gesture. When disabled, all reported motion events'
button state will not include any stylus buttons. Key events are
unaffected.
Bug: 263256832
Test: atest inputflinger_tests
Change-Id: If9ac98c77e980e6b45cfc012ed04b5541e350ebc
diff --git a/services/inputflinger/tests/FakeInputReaderPolicy.cpp b/services/inputflinger/tests/FakeInputReaderPolicy.cpp
index f755356..bb8a30e 100644
--- a/services/inputflinger/tests/FakeInputReaderPolicy.cpp
+++ b/services/inputflinger/tests/FakeInputReaderPolicy.cpp
@@ -201,6 +201,10 @@
mConfig.wheelVelocityControlParameters = params;
}
+void FakeInputReaderPolicy::setStylusButtonMotionEventsEnabled(bool enabled) {
+ mConfig.stylusButtonMotionEventsEnabled = enabled;
+}
+
void FakeInputReaderPolicy::getReaderConfiguration(InputReaderConfiguration* outConfig) {
*outConfig = mConfig;
}