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

Commit a39a2907 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Fix alpha keyboard shortcuts with ToolbarActionBar"

parents eb764888 36a5c8d0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.content.Context;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.view.ActionMode;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -467,6 +468,9 @@ public class ToolbarActionBar extends ActionBar {
    public boolean onKeyShortcut(int keyCode, KeyEvent event) {
        Menu menu = mDecorToolbar.getMenu();
        if (menu != null) {
            final KeyCharacterMap kmap = KeyCharacterMap.load(
                    event != null ? event.getDeviceId() : KeyCharacterMap.VIRTUAL_KEYBOARD);
            menu.setQwertyMode(kmap.getKeyboardType() != KeyCharacterMap.NUMERIC);
            menu.performShortcut(keyCode, event, 0);
        }
        // This action bar always returns true for handling keyboard shortcuts.