Loading services/core/java/com/android/server/pm/LauncherAppsService.java +11 −8 Original line number Diff line number Diff line Loading @@ -316,17 +316,22 @@ public class LauncherAppsService extends SystemService { final int callingUid = injectBinderCallingUid(); final ArrayList<ResolveInfo> result = new ArrayList<>(launcherActivities.getList()); final PackageManagerInternal pmInt = LocalServices.getService(PackageManagerInternal.class); if (packageName != null) { // If target package has launcher activities, then return those launcher // activities. Otherwise, return hidden activity that forwards user to app // details page. // If this hidden app should not be shown, return the original list. // Otherwise, inject hidden activity that forwards user to app details page. if (result.size() > 0) { return launcherActivities; } ApplicationInfo appInfo = pmInt.getApplicationInfo(packageName, /*flags*/ 0, callingUid, user.getIdentifier()); if (shouldShowHiddenApp(appInfo)) { ResolveInfo info = getHiddenAppActivityInfo(packageName, callingUid, user); if (info != null) { result.add(info); } } return new ParceledListSlice<>(result); } Loading @@ -336,8 +341,6 @@ public class LauncherAppsService extends SystemService { for (ResolveInfo info : result) { visiblePackages.add(info.activityInfo.packageName); } final PackageManagerInternal pmInt = LocalServices.getService(PackageManagerInternal.class); List<ApplicationInfo> installedPackages = pmInt.getInstalledApplications(0, user.getIdentifier(), callingUid); for (ApplicationInfo applicationInfo : installedPackages) { Loading Loading
services/core/java/com/android/server/pm/LauncherAppsService.java +11 −8 Original line number Diff line number Diff line Loading @@ -316,17 +316,22 @@ public class LauncherAppsService extends SystemService { final int callingUid = injectBinderCallingUid(); final ArrayList<ResolveInfo> result = new ArrayList<>(launcherActivities.getList()); final PackageManagerInternal pmInt = LocalServices.getService(PackageManagerInternal.class); if (packageName != null) { // If target package has launcher activities, then return those launcher // activities. Otherwise, return hidden activity that forwards user to app // details page. // If this hidden app should not be shown, return the original list. // Otherwise, inject hidden activity that forwards user to app details page. if (result.size() > 0) { return launcherActivities; } ApplicationInfo appInfo = pmInt.getApplicationInfo(packageName, /*flags*/ 0, callingUid, user.getIdentifier()); if (shouldShowHiddenApp(appInfo)) { ResolveInfo info = getHiddenAppActivityInfo(packageName, callingUid, user); if (info != null) { result.add(info); } } return new ParceledListSlice<>(result); } Loading @@ -336,8 +341,6 @@ public class LauncherAppsService extends SystemService { for (ResolveInfo info : result) { visiblePackages.add(info.activityInfo.packageName); } final PackageManagerInternal pmInt = LocalServices.getService(PackageManagerInternal.class); List<ApplicationInfo> installedPackages = pmInt.getInstalledApplications(0, user.getIdentifier(), callingUid); for (ApplicationInfo applicationInfo : installedPackages) { Loading