Loading core/api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -12507,7 +12507,7 @@ package android.content.pm { method public boolean hasShortcutHostPermission(); method @RequiresPermission(conditional=true, anyOf={"android.permission.ACCESS_HIDDEN_PROFILES_FULL", android.Manifest.permission.ACCESS_HIDDEN_PROFILES}) public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle); method @RequiresPermission(conditional=true, anyOf={"android.permission.ACCESS_HIDDEN_PROFILES_FULL", android.Manifest.permission.ACCESS_HIDDEN_PROFILES}) public boolean isPackageEnabled(String, android.os.UserHandle); method public void pinShortcuts(@NonNull String, @NonNull java.util.List<java.lang.String>, @NonNull android.os.UserHandle); method @RequiresPermission(conditional=true, value="android.permission.ACCESS_SHORTCUTS") public void pinShortcuts(@NonNull String, @NonNull java.util.List<java.lang.String>, @NonNull android.os.UserHandle); method @RequiresPermission(conditional=true, anyOf={"android.permission.ACCESS_HIDDEN_PROFILES_FULL", android.Manifest.permission.ACCESS_HIDDEN_PROFILES}) public void registerCallback(android.content.pm.LauncherApps.Callback); method @RequiresPermission(conditional=true, anyOf={"android.permission.ACCESS_HIDDEN_PROFILES_FULL", android.Manifest.permission.ACCESS_HIDDEN_PROFILES}) public void registerCallback(android.content.pm.LauncherApps.Callback, android.os.Handler); method public void registerPackageInstallerSessionCallback(@NonNull java.util.concurrent.Executor, @NonNull android.content.pm.PackageInstaller.SessionCallback); core/java/android/appwidget/AppWidgetManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -1384,7 +1384,8 @@ public class AppWidgetManager { * * @return {@code TRUE} if the launcher supports this feature. Note the API will return without * waiting for the user to respond, so getting {@code TRUE} from this API does *not* mean * the shortcut is pinned. {@code FALSE} if the launcher doesn't support this feature. * the shortcut is pinned. {@code FALSE} if the launcher doesn't support this feature or if * calling app belongs to a user-profile with items restricted on home screen. * * @see android.content.pm.ShortcutManager#isRequestPinShortcutSupported() * @see android.content.pm.ShortcutManager#requestPinShortcut(ShortcutInfo, IntentSender) Loading core/java/android/content/pm/LauncherApps.java +9 −1 Original line number Diff line number Diff line Loading @@ -1097,7 +1097,8 @@ public class LauncherApps { * @param packageName The specific package to query. If null, it checks all installed packages * in the profile. * @param user The UserHandle of the profile. * @return List of config activities. Can be an empty list but will not be null. * @return List of config activities. Can be an empty list but will not be null. Empty list will * be returned for user-profiles that have items restricted on home screen. * * @see Intent#ACTION_CREATE_SHORTCUT * @see #getShortcutConfigActivityIntent(LauncherActivityInfo) Loading Loading @@ -1488,6 +1489,9 @@ public class LauncherApps { * <p>The calling launcher application must be allowed to access the shortcut information, * as defined in {@link #hasShortcutHostPermission()}. * * <p>For user-profiles with items restricted on home screen, caller must have the required * permission. * * @param packageName The target package name. * @param shortcutIds The IDs of the shortcut to be pinned. * @param user The UserHandle of the profile. Loading @@ -1496,6 +1500,7 @@ public class LauncherApps { * * @see ShortcutManager */ @RequiresPermission(conditional = true, value = android.Manifest.permission.ACCESS_SHORTCUTS) public void pinShortcuts(@NonNull String packageName, @NonNull List<String> shortcutIds, @NonNull UserHandle user) { logErrorForInvalidProfileAccess(user); Loading Loading @@ -2298,6 +2303,9 @@ public class LauncherApps { * app's manifest, have the android.permission.QUERY_ALL_PACKAGES, or be the session owner to * watch for these events. * * <p> Session callbacks are not sent for user-profiles that have items restricted on home * screen. * * @param callback The callback to register. * @param executor {@link Executor} to handle the callbacks, cannot be null. * Loading core/java/android/content/pm/PackageInstaller.java +4 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,10 @@ public class PackageInstaller { * Broadcast Action: Explicit broadcast sent to the last known default launcher when a session * for a new install is committed. For managed profile, this is sent to the default launcher * of the primary profile. * For user-profiles that have items restricted on home screen, this broadcast is sent to * the default launcher of the primary profile, only if it has either * {@link Manifest.permission.ACCESS_HIDDEN_PROFILES_FULL} or * {@link Manifest.permission.ACCESS_HIDDEN_PROFILES} permission. * <p> * The associated session is defined in {@link #EXTRA_SESSION} and the user for which this * session was created in {@link Intent#EXTRA_USER}. Loading core/java/android/content/pm/ShortcutManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -584,7 +584,7 @@ public class ShortcutManager { * @return {@code TRUE} if the launcher supports this feature. Note the API will return without * waiting for the user to respond, so getting {@code TRUE} from this API does *not* mean * the shortcut was pinned successfully. {@code FALSE} if the launcher doesn't support this * feature. * feature or if calling app belongs to a user-profile with items restricted on home screen. * * @see #isRequestPinShortcutSupported() * @see IntentSender Loading Loading
core/api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -12507,7 +12507,7 @@ package android.content.pm { method public boolean hasShortcutHostPermission(); method @RequiresPermission(conditional=true, anyOf={"android.permission.ACCESS_HIDDEN_PROFILES_FULL", android.Manifest.permission.ACCESS_HIDDEN_PROFILES}) public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle); method @RequiresPermission(conditional=true, anyOf={"android.permission.ACCESS_HIDDEN_PROFILES_FULL", android.Manifest.permission.ACCESS_HIDDEN_PROFILES}) public boolean isPackageEnabled(String, android.os.UserHandle); method public void pinShortcuts(@NonNull String, @NonNull java.util.List<java.lang.String>, @NonNull android.os.UserHandle); method @RequiresPermission(conditional=true, value="android.permission.ACCESS_SHORTCUTS") public void pinShortcuts(@NonNull String, @NonNull java.util.List<java.lang.String>, @NonNull android.os.UserHandle); method @RequiresPermission(conditional=true, anyOf={"android.permission.ACCESS_HIDDEN_PROFILES_FULL", android.Manifest.permission.ACCESS_HIDDEN_PROFILES}) public void registerCallback(android.content.pm.LauncherApps.Callback); method @RequiresPermission(conditional=true, anyOf={"android.permission.ACCESS_HIDDEN_PROFILES_FULL", android.Manifest.permission.ACCESS_HIDDEN_PROFILES}) public void registerCallback(android.content.pm.LauncherApps.Callback, android.os.Handler); method public void registerPackageInstallerSessionCallback(@NonNull java.util.concurrent.Executor, @NonNull android.content.pm.PackageInstaller.SessionCallback);
core/java/android/appwidget/AppWidgetManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -1384,7 +1384,8 @@ public class AppWidgetManager { * * @return {@code TRUE} if the launcher supports this feature. Note the API will return without * waiting for the user to respond, so getting {@code TRUE} from this API does *not* mean * the shortcut is pinned. {@code FALSE} if the launcher doesn't support this feature. * the shortcut is pinned. {@code FALSE} if the launcher doesn't support this feature or if * calling app belongs to a user-profile with items restricted on home screen. * * @see android.content.pm.ShortcutManager#isRequestPinShortcutSupported() * @see android.content.pm.ShortcutManager#requestPinShortcut(ShortcutInfo, IntentSender) Loading
core/java/android/content/pm/LauncherApps.java +9 −1 Original line number Diff line number Diff line Loading @@ -1097,7 +1097,8 @@ public class LauncherApps { * @param packageName The specific package to query. If null, it checks all installed packages * in the profile. * @param user The UserHandle of the profile. * @return List of config activities. Can be an empty list but will not be null. * @return List of config activities. Can be an empty list but will not be null. Empty list will * be returned for user-profiles that have items restricted on home screen. * * @see Intent#ACTION_CREATE_SHORTCUT * @see #getShortcutConfigActivityIntent(LauncherActivityInfo) Loading Loading @@ -1488,6 +1489,9 @@ public class LauncherApps { * <p>The calling launcher application must be allowed to access the shortcut information, * as defined in {@link #hasShortcutHostPermission()}. * * <p>For user-profiles with items restricted on home screen, caller must have the required * permission. * * @param packageName The target package name. * @param shortcutIds The IDs of the shortcut to be pinned. * @param user The UserHandle of the profile. Loading @@ -1496,6 +1500,7 @@ public class LauncherApps { * * @see ShortcutManager */ @RequiresPermission(conditional = true, value = android.Manifest.permission.ACCESS_SHORTCUTS) public void pinShortcuts(@NonNull String packageName, @NonNull List<String> shortcutIds, @NonNull UserHandle user) { logErrorForInvalidProfileAccess(user); Loading Loading @@ -2298,6 +2303,9 @@ public class LauncherApps { * app's manifest, have the android.permission.QUERY_ALL_PACKAGES, or be the session owner to * watch for these events. * * <p> Session callbacks are not sent for user-profiles that have items restricted on home * screen. * * @param callback The callback to register. * @param executor {@link Executor} to handle the callbacks, cannot be null. * Loading
core/java/android/content/pm/PackageInstaller.java +4 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,10 @@ public class PackageInstaller { * Broadcast Action: Explicit broadcast sent to the last known default launcher when a session * for a new install is committed. For managed profile, this is sent to the default launcher * of the primary profile. * For user-profiles that have items restricted on home screen, this broadcast is sent to * the default launcher of the primary profile, only if it has either * {@link Manifest.permission.ACCESS_HIDDEN_PROFILES_FULL} or * {@link Manifest.permission.ACCESS_HIDDEN_PROFILES} permission. * <p> * The associated session is defined in {@link #EXTRA_SESSION} and the user for which this * session was created in {@link Intent#EXTRA_USER}. Loading
core/java/android/content/pm/ShortcutManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -584,7 +584,7 @@ public class ShortcutManager { * @return {@code TRUE} if the launcher supports this feature. Note the API will return without * waiting for the user to respond, so getting {@code TRUE} from this API does *not* mean * the shortcut was pinned successfully. {@code FALSE} if the launcher doesn't support this * feature. * feature or if calling app belongs to a user-profile with items restricted on home screen. * * @see #isRequestPinShortcutSupported() * @see IntentSender Loading