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

Commit b7db0cc8 authored by Ben Murdoch's avatar Ben Murdoch Committed by Android (Google) Code Review
Browse files

Merge "Fix up ModifierShortcutsTests to use test bookmarks.xml" into main

parents 037392f3 348d2668
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -65,7 +65,8 @@ public class ModifierShortcutTests extends ShortcutKeyTestBase {
    private static final SparseArray<String> INTENT_SHORTCUTS =  new SparseArray<>();
    private static final SparseArray<String> ROLE_SHORTCUTS =  new SparseArray<>();
    static {
        // These shortcuts should align with those defined in bookmarks.xml
        // 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_C, Intent.CATEGORY_APP_CONTACTS);
        INTENT_SHORTCUTS.append(KEYCODE_E, Intent.CATEGORY_APP_EMAIL);
+4 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import static java.util.Collections.unmodifiableMap;

import android.content.Context;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.platform.test.flag.junit.SetFlagsRule;
import android.util.ArrayMap;
import android.view.InputDevice;
@@ -102,6 +103,9 @@ class ShortcutKeyTestBase {
        doReturn(mResources).when(mContext).getResources();
        doReturn(mSettingsProviderRule.mockContentResolver(mContext))
                .when(mContext).getContentResolver();
        XmlResourceParser testBookmarks = mResources.getXml(
                com.android.frameworks.wmtests.R.xml.bookmarks);
        doReturn(testBookmarks).when(mResources).getXml(com.android.internal.R.xml.bookmarks);
    }