Skip to content
Commit 70eafe06 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

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.

This configuration is toggled through PhoneWindowManager based on
user-facing settings. Since this configuration does not affect KeyEvents
generated from stylus buttons, this gives a chance for the policy to
react to stylus button presses even when motion events are disabled.
For example, the policy can still be notified of stylus button presses
just as with any other key press, allowing the policy to make decisions
such as whether or not the device should be woken up. The policy can
also choose to ignore key presses and prevent them from being sent to
apps.

DD: go/android-stylus-buttons

Bug: 263256832
Test: atest inputflinger_tests
Change-Id: I68edaef5e6228aadf645586fbc1c4afcd499f712
parent b425997d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment