From 0778a898f4706ab2c37467d55fc936ebf0f5b38c Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Thu, 19 Jan 2017 15:19:04 -0800 Subject: [PATCH] Use the new API being introduced in I34e9f351d2a8addf Bug: 34340531 Test: Manual tests Change-Id: I5c4a95edb7008bbd5723f87249cbc68c06f82234 --- .../android/pm/shortcutlauncherdemo/AppListFragment.java | 2 +- .../android/pm/shortcutlauncherdemo/ShortcutListFragment.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/ShortcutDemo/launcher/src/com/example/android/pm/shortcutlauncherdemo/AppListFragment.java b/samples/ShortcutDemo/launcher/src/com/example/android/pm/shortcutlauncherdemo/AppListFragment.java index 8c3edb124..819066a1c 100644 --- a/samples/ShortcutDemo/launcher/src/com/example/android/pm/shortcutlauncherdemo/AppListFragment.java +++ b/samples/ShortcutDemo/launcher/src/com/example/android/pm/shortcutlauncherdemo/AppListFragment.java @@ -57,7 +57,7 @@ public class AppListFragment extends MyBaseListFragment { final List apps = new ArrayList<>(); - for (UserHandle user : mUserManager.getUserProfiles()) { + for (UserHandle user : mLauncherApps.getProfiles()) { apps.addAll(mLauncherApps.getActivityList(null, user)); } Collections.sort(apps, sLauncherIconComparator); diff --git a/samples/ShortcutDemo/launcher/src/com/example/android/pm/shortcutlauncherdemo/ShortcutListFragment.java b/samples/ShortcutDemo/launcher/src/com/example/android/pm/shortcutlauncherdemo/ShortcutListFragment.java index 26d4484fb..a48cc35d4 100644 --- a/samples/ShortcutDemo/launcher/src/com/example/android/pm/shortcutlauncherdemo/ShortcutListFragment.java +++ b/samples/ShortcutDemo/launcher/src/com/example/android/pm/shortcutlauncherdemo/ShortcutListFragment.java @@ -82,7 +82,7 @@ public class ShortcutListFragment extends MyBaseListFragment { private List getTargetUsers() { final UserHandle arg = getArguments().getParcelable(ARG_USER); if (arg == null) { - return mUserManager.getUserProfiles(); + return mLauncherApps.getProfiles(); } else { final List ret = new ArrayList<>(); ret.add(arg);