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);