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

Commit 936f27cb authored by Michael Wright's avatar Michael Wright
Browse files

Always request keyboard shorcuts, even if there's no menu.

Bug: 36964520
Test: cts-tradefed run cts-dev --module CtsAppTestCases -t android.app.cts.ActivityKeyboardShortcutsTest#testRequestShowKeyboardShortcuts
Change-Id: Idc2224260470dfd58a08cd8b2df5d8de67fbaea4
parent 76679ead
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2263,8 +2263,9 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
    @Override
    public void requestKeyboardShortcuts(List<KeyboardShortcutGroup> list, int deviceId) {
        final PanelFeatureState st = mWindow.getPanelState(FEATURE_OPTIONS_PANEL, false);
        if (!mWindow.isDestroyed() && st != null && mWindow.getCallback() != null) {
            mWindow.getCallback().onProvideKeyboardShortcuts(list, st.menu, deviceId);
        final Menu menu = st != null ? st.menu : null;
        if (!mWindow.isDestroyed() && mWindow.getCallback() != null) {
            mWindow.getCallback().onProvideKeyboardShortcuts(list, menu, deviceId);
        }
    }