diff options
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java | 8 | ||||
| -rw-r--r-- | packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java | 23 |
2 files changed, 2 insertions, 29 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java b/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java index ffd6791725ed..af73158d07f2 100644 --- a/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java @@ -205,12 +205,9 @@ public class TileUtils { /** * Build a list of DashboardCategory. - * - * @param extraAction additional intent filter action to be usetileutild to build the dashboard - * categories */ public static List<DashboardCategory> getCategories(Context context, - Map<Pair<String, String>, Tile> cache, String extraAction) { + Map<Pair<String, String>, Tile> cache) { final long startTime = System.currentTimeMillis(); boolean setup = Global.getInt(context.getContentResolver(), Global.DEVICE_PROVISIONED, 0) != 0; @@ -229,9 +226,6 @@ public class TileUtils { if (setup) { getTilesForAction(context, user, EXTRA_SETTINGS_ACTION, cache, null, tiles, false); getTilesForAction(context, user, IA_SETTINGS_ACTION, cache, null, tiles, false); - if (extraAction != null) { - getTilesForAction(context, user, extraAction, cache, null, tiles, false); - } } } diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java index 3eb273d55639..91db95c719a9 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java @@ -152,27 +152,6 @@ public class TileUtilsTest { } @Test - public void getCategories_shouldHandleExtraIntentAction() { - final String testCategory = "category1"; - final String testAction = "action1"; - Map<Pair<String, String>, Tile> cache = new ArrayMap<>(); - List<ResolveInfo> info = new ArrayList<>(); - info.add(newInfo(true, testCategory)); - Global.putInt(mContext.getContentResolver(), Global.DEVICE_PROVISIONED, 1); - when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); - List<UserHandle> userHandleList = new ArrayList<>(); - userHandleList.add(UserHandle.CURRENT); - when(mUserManager.getUserProfiles()).thenReturn(userHandleList); - - when(mPackageManager.queryIntentActivitiesAsUser(argThat( - event -> testAction.equals(event.getAction())), anyInt(), anyInt())) - .thenReturn(info); - - List<DashboardCategory> categoryList = TileUtils.getCategories(mContext, cache, testAction); - assertThat(categoryList.get(0).getTile(0).getCategory()).isEqualTo(testCategory); - } - - @Test public void getCategories_withPackageName() { ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class); Map<Pair<String, String>, Tile> cache = new ArrayMap<>(); @@ -183,7 +162,7 @@ public class TileUtilsTest { userHandleList.add(new UserHandle(ActivityManager.getCurrentUser())); when(mUserManager.getUserProfiles()).thenReturn(userHandleList); - TileUtils.getCategories(mContext, cache, null /* action */); + TileUtils.getCategories(mContext, cache); verify(mPackageManager, atLeastOnce()).queryIntentActivitiesAsUser( intentCaptor.capture(), anyInt(), anyInt()); |