diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java index 037a149bfe371..c74daa8eadfc7 100644 --- a/core/java/android/content/pm/LauncherApps.java +++ b/core/java/android/content/pm/LauncherApps.java @@ -503,9 +503,38 @@ public class LauncherApps { } /** - * Retrieves a list of launchable activities that match {@link Intent#ACTION_MAIN} and - * {@link Intent#CATEGORY_LAUNCHER}, for a specified user. Result may include - * synthesized activities like app details Activity injected by system. + * Retrieves a list of activities that specify {@link Intent#ACTION_MAIN} and + * {@link Intent#CATEGORY_LAUNCHER}, across all apps, for a specified user. If an app doesn't + * have any activities that specify ACTION_MAIN or CATEGORY_LAUNCHER, + * the system adds a synthesized activity to the list. This synthesized activity represents the + * app's details page within system settings. + * + *

Note: It's possible for system apps, such as app stores, to prevent + * the system from adding synthesized activities to the returned list.

+ * + *

As of Android Q, at least + * one of the app's activities or synthesized activities appears in the returned list unless the + * app satisfies at least one of the following conditions:

+ * + * + *

Additionally, the system hides synthesized activities for some or all apps in the + * following enterprise-related cases:

+ * * * @param packageName The specific package to query. If null, it checks all installed packages * in the profile.