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

Commit f7d8fbca authored by Jackal Guo's avatar Jackal Guo Committed by Android (Google) Code Review
Browse files

Merge "Start a11y shortcut via keyboard"

parents 2d3972e2 d9d4f11e
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -6046,6 +6046,19 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            }
        }

        // Intercept the Accessibility keychord (CTRL + ALT + Z) for keyboard users.
        if (mAccessibilityShortcutController.isAccessibilityShortcutAvailable(isKeyguardLocked())) {
            switch (keyCode) {
                case KeyEvent.KEYCODE_Z: {
                    if (down && event.isCtrlPressed() && event.isAltPressed()) {
                        mHandler.sendMessage(mHandler.obtainMessage(MSG_ACCESSIBILITY_SHORTCUT));
                        result &= ~ACTION_PASS_TO_USER;
                    }
                    break;
                }
            }
        }

        if (useHapticFeedback) {
            performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false,
                    "Virtual Key - Press");