Merge "Only Dispatch Stylus Key Events to System UI on Key Down"

This commit is contained in:
Marcello Galhardo
2023-01-13 18:05:25 +00:00
committed by Android (Google) Code Review

View File

@@ -4316,7 +4316,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
case KeyEvent.KEYCODE_STYLUS_BUTTON_SECONDARY:
case KeyEvent.KEYCODE_STYLUS_BUTTON_TERTIARY:
case KeyEvent.KEYCODE_STYLUS_BUTTON_TAIL: {
if (!mStylusButtonsDisabled) {
if (down && !mStylusButtonsDisabled) {
sendSystemKeyToStatusBarAsync(keyCode);
}
result &= ~ACTION_PASS_TO_USER;