diff options
| author | 2019-08-28 17:56:05 -0700 | |
|---|---|---|
| committer | 2019-08-28 17:56:05 -0700 | |
| commit | eba15ec2b44337c8603371ce0ec8458667b4b95d (patch) | |
| tree | 74c69b50e9c42db8c4e1301192e603f2c35d5d17 | |
| parent | c0f522c3ec4e01127430e39de72422eab38de436 (diff) | |
| parent | 5e1a48a6609826ba67f92b42e01ea4a656b15b45 (diff) | |
Merge "docs: Added desc. of launcher app criteria in Q" into qt-dev am: b14d2dede2 am: 13e2b970ec
am: 5e1a48a660
Change-Id: Ic65f9e1e2a51d91a08b482b3ee2e66f9f0ef29ea
| -rw-r--r-- | core/java/android/content/pm/LauncherApps.java | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java index 037a149bfe37..c74daa8eadfc 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 <code>ACTION_MAIN</code> or <code>CATEGORY_LAUNCHER</code>, + * the system adds a synthesized activity to the list. This synthesized activity represents the + * app's details page within system settings. + * + * <p class="note"><b>Note: </b>It's possible for system apps, such as app stores, to prevent + * the system from adding synthesized activities to the returned list.</p> + * + * <p>As of <a href="/reference/android/os/Build.VERSION_CODES.html#Q">Android Q</a>, 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:</p> + * <ul> + * <li>The app is a system app.</li> + * <li>The app doesn't request any <a href="/guide/topics/permissions/overview">permissions</a>. + * </li> + * <li>The <code><application></code> tag in the app's manifest doesn't contain any child + * elements that represent + * <a href="/guide/components/fundamentals#DeclaringComponents">app components</a>.</li> + * </ul> + * + * <p>Additionally, the system hides synthesized activities for some or all apps in the + * following enterprise-related cases:</p> + * <ul> + * <li>If the device is a + * <a href="https://developers.google.com/android/work/overview#company-owned-devices-for-knowledge-workers">fully + * managed device</a>, no synthesized activities for any app appear in the returned list.</li> + * <li>If the current user has a + * <a href="https://developers.google.com/android/work/overview#employee-owned-devices-byod">work + * profile</a>, no synthesized activities for the user's work apps appear in the returned + * list.</li> + * </ul> * * @param packageName The specific package to query. If null, it checks all installed packages * in the profile. |