Loading services/tests/wmtests/src/com/android/server/policy/ModifierShortcutTests.java +2 −1 Original line number Diff line number Diff line Loading @@ -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); Loading services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java +4 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); } Loading Loading
services/tests/wmtests/src/com/android/server/policy/ModifierShortcutTests.java +2 −1 Original line number Diff line number Diff line Loading @@ -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); Loading
services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java +4 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); } Loading