diff options
author | Kevin Hufnagle <khufnagle@google.com> | 2019-08-12 16:52:41 -0700 |
---|---|---|
committer | Kevin Hufnagle <khufnagle@google.com> | 2019-08-12 16:52:41 -0700 |
commit | 786f22e4169126c82358490ad6e9c70028fc102b (patch) | |
tree | 00356582545fcd582d36ae4add6261bbfbe97734 | |
parent | 8931739c16b538800aca170aac399738dbb1837e (diff) | |
download | base-786f22e4169126c82358490ad6e9c70028fc102b.tar.gz |
docs: Added desc. of launcher app criteria in Q
As of Android Q, an app is included in the return value of
LauncherApps#getActivityList() unless it fulfills specific criteria.
This CL describes the conditions necessary for an app's activities
to *not* appear in the list.
Test: make ds-docs -j32
Bug: 130352392
Change-Id: Iad888a7a7f47d090da1b143ac152705577144d20
-rw-r--r-- | core/java/android/content/pm/LauncherApps.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java index 037a149bfe37..d58eb0df7d8d 100644 --- a/core/java/android/content/pm/LauncherApps.java +++ b/core/java/android/content/pm/LauncherApps.java @@ -507,6 +507,18 @@ public class LauncherApps { * {@link Intent#CATEGORY_LAUNCHER}, for a specified user. Result may include * synthesized activities like app details Activity injected by system. * + * <p>As of <a href="/reference/android/os/Build.VERSION_CODES.html#Q">Android Q</a>, the + * launchable activities for a given app are included 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 declare any <a href="/guide/topics/permissions/overview">permissions</a>. + * </li> + * <li>The <code><application></code> tag in the app's manifest file doesn't contain any + * child elements that represent + * <a href="/guide/components/fundamentals#DeclaringComponents">app components</a>.</li> + * </ul> + * * @param packageName The specific package to query. If null, it checks all installed packages * in the profile. * @param user The UserHandle of the profile. |