Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47c4941e authored by Marcello Galhardo's avatar Marcello Galhardo
Browse files

Dispatch Stylus Key Events to System UI

Test: manual

Fixes: b/254604589
Change-Id: I29a06d5e9aef09d1b6705147ca0543b13417df44
parent 1d7957fa
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -4283,9 +4283,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case KeyEvent.KEYCODE_DEMO_APP_3:
            case KeyEvent.KEYCODE_DEMO_APP_4: {
                // TODO(b/254604589): Dispatch KeyEvent to System UI.
                if (!mStylusButtonsDisabled) {
                sendSystemKeyToStatusBarAsync(keyCode);
                }

                // Just drop if keys are not intercepted for direct key.
                result &= ~ACTION_PASS_TO_USER;
@@ -4295,7 +4293,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case KeyEvent.KEYCODE_STYLUS_BUTTON_SECONDARY:
            case KeyEvent.KEYCODE_STYLUS_BUTTON_TERTIARY:
            case KeyEvent.KEYCODE_STYLUS_BUTTON_TAIL: {
                // TODO(go/android-stylus-buttons): Handle stylus button presses.
                if (!mStylusButtonsDisabled) {
                    sendSystemKeyToStatusBarAsync(keyCode);
                }
                result &= ~ACTION_PASS_TO_USER;
                break;
            }