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

Commit da5885d5 authored by Liana Kazanova (xWF)'s avatar Liana Kazanova (xWF) Committed by Android (Google) Code Review
Browse files

Merge "Revert "Modify bookmark shortcuts for platform alignment"" into main

parents b08834b5 d1e94e1d
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -20,10 +20,14 @@

     Typical shortcuts (not necessarily defined here):
       'b': Browser
       'p': Contacts
       'c': Contacts
       'e': Email
       'c': Calendar
       'g': GMail
       'k': Calendar
       'm': Maps
       'p': Music
       's': SMS
       't': Talk
       'u': Calculator
       'y': YouTube
-->
@@ -34,7 +38,7 @@
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_CONTACTS"
        androidprv:keycode="KEYCODE_P"
        androidprv:keycode="KEYCODE_C"
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_EMAIL"
@@ -42,12 +46,20 @@
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_CALENDAR"
        androidprv:keycode="KEYCODE_C"
        androidprv:keycode="KEYCODE_K"
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_MAPS"
        androidprv:keycode="KEYCODE_M"
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_MUSIC"
        androidprv:keycode="KEYCODE_P"
        androidprv:modifierState="META" />
    <bookmark
        role="android.app.role.SMS"
        androidprv:keycode="KEYCODE_S"
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_CALCULATOR"
        androidprv:keycode="KEYCODE_U"
+14 −4
Original line number Diff line number Diff line
@@ -20,10 +20,14 @@

     Typical shortcuts (not necessarily defined here):
       'b': Browser
       'p': Contacts
       'c': Contacts
       'e': Email
       'c': Calendar
       'g': GMail
       'k': Calendar
       'm': Maps
       'p': Music
       's': SMS
       't': Talk
       'u': Calculator
       'y': YouTube
-->
@@ -36,16 +40,22 @@
        shortcut="b" />
    <bookmark
        category="android.intent.category.APP_CONTACTS"
        shortcut="p" />
        shortcut="c" />
    <bookmark
        category="android.intent.category.APP_EMAIL"
        shortcut="e" />
    <bookmark
        category="android.intent.category.APP_CALENDAR"
        shortcut="c" />
        shortcut="k" />
    <bookmark
        category="android.intent.category.APP_MAPS"
        shortcut="m" />
    <bookmark
        category="android.intent.category.APP_MUSIC"
        shortcut="p" />
    <bookmark
        role="android.app.role.SMS"
        shortcut="s" />
    <bookmark
        category="android.intent.category.APP_CALCULATOR"
        shortcut="u" />
+8 −2
Original line number Diff line number Diff line
@@ -768,6 +768,8 @@ public final class KeyboardShortcutListSearch {
                    Intent.CATEGORY_APP_EMAIL,
                    Intent.CATEGORY_APP_CALENDAR,
                    Intent.CATEGORY_APP_MAPS,
                    Intent.CATEGORY_APP_MUSIC,
                    Intent.CATEGORY_APP_MESSAGING,
                    Intent.CATEGORY_APP_CALCULATOR,
            };
            String[] shortcutLabels = {
@@ -776,15 +778,19 @@ public final class KeyboardShortcutListSearch {
                    mContext.getString(R.string.keyboard_shortcut_group_applications_email),
                    mContext.getString(R.string.keyboard_shortcut_group_applications_calendar),
                    mContext.getString(R.string.keyboard_shortcut_group_applications_maps),
                    mContext.getString(R.string.keyboard_shortcut_group_applications_music),
                    mContext.getString(R.string.keyboard_shortcut_group_applications_sms),
                    mContext.getString(R.string.keyboard_shortcut_group_applications_calculator)
            };

            int[] keyCodes = {
                KeyEvent.KEYCODE_B,
                KeyEvent.KEYCODE_P,
                KeyEvent.KEYCODE_E,
                KeyEvent.KEYCODE_C,
                KeyEvent.KEYCODE_E,
                KeyEvent.KEYCODE_K,
                KeyEvent.KEYCODE_M,
                KeyEvent.KEYCODE_P,
                KeyEvent.KEYCODE_S,
                KeyEvent.KEYCODE_U,
            };

+10 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_CONTACTS"
        androidprv:keycode="KEYCODE_P"
        androidprv:keycode="KEYCODE_C"
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_EMAIL"
@@ -30,12 +30,20 @@
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_CALENDAR"
        androidprv:keycode="KEYCODE_C"
        androidprv:keycode="KEYCODE_K"
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_MAPS"
        androidprv:keycode="KEYCODE_M"
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_MUSIC"
        androidprv:keycode="KEYCODE_P"
        androidprv:modifierState="META" />
    <bookmark
        role="android.app.role.SMS"
        androidprv:keycode="KEYCODE_S"
        androidprv:modifierState="META" />
    <bookmark
        category="android.intent.category.APP_CALCULATOR"
        androidprv:keycode="KEYCODE_U"
+6 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import static android.view.KeyEvent.KEYCODE_E;
import static android.view.KeyEvent.KEYCODE_ENTER;
import static android.view.KeyEvent.KEYCODE_H;
import static android.view.KeyEvent.KEYCODE_J;
import static android.view.KeyEvent.KEYCODE_K;
import static android.view.KeyEvent.KEYCODE_M;
import static android.view.KeyEvent.KEYCODE_META_LEFT;
import static android.view.KeyEvent.KEYCODE_N;
@@ -66,12 +67,14 @@ public class ModifierShortcutTests extends ShortcutKeyTestBase {
        // These shortcuts should align with those defined in
        // services/tests/wmtests/res/xml/bookmarks.xml
        INTENT_SHORTCUTS.append(KEYCODE_U, Intent.CATEGORY_APP_CALCULATOR);
        INTENT_SHORTCUTS.append(KEYCODE_P, Intent.CATEGORY_APP_CONTACTS);
        INTENT_SHORTCUTS.append(KEYCODE_C, Intent.CATEGORY_APP_CONTACTS);
        INTENT_SHORTCUTS.append(KEYCODE_E, Intent.CATEGORY_APP_EMAIL);
        INTENT_SHORTCUTS.append(KEYCODE_C, Intent.CATEGORY_APP_CALENDAR);
        INTENT_SHORTCUTS.append(KEYCODE_K, Intent.CATEGORY_APP_CALENDAR);
        INTENT_SHORTCUTS.append(KEYCODE_M, Intent.CATEGORY_APP_MAPS);
        INTENT_SHORTCUTS.append(KEYCODE_P, Intent.CATEGORY_APP_MUSIC);

        ROLE_SHORTCUTS.append(KEYCODE_B, RoleManager.ROLE_BROWSER);
        ROLE_SHORTCUTS.append(KEYCODE_S, RoleManager.ROLE_SMS);
    }
    private static final int ANY_DISPLAY_ID = 123;

@@ -106,7 +109,7 @@ public class ModifierShortcutTests extends ShortcutKeyTestBase {
        sendKeyCombination(new int[]{KEYCODE_META_LEFT, KEYCODE_SHIFT_LEFT, KEYCODE_B}, 0);
        mPhoneWindowManager.assertLaunchRole(RoleManager.ROLE_BROWSER);

        sendKeyCombination(new int[]{KEYCODE_META_LEFT, KEYCODE_SHIFT_LEFT, KEYCODE_P}, 0);
        sendKeyCombination(new int[]{KEYCODE_META_LEFT, KEYCODE_SHIFT_LEFT, KEYCODE_C}, 0);
        mPhoneWindowManager.assertLaunchCategory(Intent.CATEGORY_APP_CONTACTS);

        sendKeyCombination(new int[]{KEYCODE_META_LEFT, KEYCODE_SHIFT_LEFT, KEYCODE_J}, 0);
Loading