Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -12391,6 +12391,7 @@ package android.content.pm { method 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); method public android.content.pm.LauncherActivityInfo resolveActivity(android.content.Intent, android.os.UserHandle); method @FlaggedApi("android.content.pm.archiving") public void setArchiveCompatibilityOptions(boolean, boolean); method public boolean shouldHideFromSuggestions(@NonNull String, @NonNull android.os.UserHandle); method public void startAppDetailsActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle); method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle); core/java/android/app/AppOpsManager.java +41 −2 Original line number Diff line number Diff line Loading @@ -1555,9 +1555,24 @@ public class AppOpsManager { */ public static final int OP_RUN_BACKUP_JOBS = AppProtoEnums.APP_OP_RUN_BACKUP_JOBS; /** * Whether the app has enabled to receive the icon overlay for fetching archived apps. * * @hide */ public static final int OP_ARCHIVE_ICON_OVERLAY = AppProtoEnums.APP_OP_ARCHIVE_ICON_OVERLAY; /** * Whether the app has enabled compatibility support for unarchival. * * @hide */ public static final int OP_UNARCHIVAL_CONFIRMATION = AppProtoEnums.APP_OP_UNARCHIVAL_CONFIRMATION; /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public static final int _NUM_OP = 145; public static final int _NUM_OP = 147; /** * All app ops represented as strings. Loading Loading @@ -1708,6 +1723,8 @@ public class AppOpsManager { OPSTR_RESERVED_FOR_TESTING, OPSTR_RAPID_CLEAR_NOTIFICATIONS_BY_LISTENER, OPSTR_RUN_BACKUP_JOBS, OPSTR_ARCHIVE_ICON_OVERLAY, OPSTR_UNARCHIVAL_CONFIRMATION, }) public @interface AppOpString {} Loading Loading @@ -2047,6 +2064,20 @@ public class AppOpsManager { @FlaggedApi(Flags.FLAG_ENABLE_PRIVILEGED_ROUTING_FOR_MEDIA_ROUTING_CONTROL) public static final String OPSTR_MEDIA_ROUTING_CONTROL = "android:media_routing_control"; /** * Whether the app has enabled to receive the icon overlay for fetching archived apps. * * @hide */ public static final String OPSTR_ARCHIVE_ICON_OVERLAY = "android:archive_icon_overlay"; /** * Whether the app has enabled compatibility support for unarchival. * * @hide */ public static final String OPSTR_UNARCHIVAL_CONFIRMATION = "android:unarchival_support"; /** * AppOp granted to apps that we are started via {@code am instrument -e --no-isolated-storage} * Loading Loading @@ -2520,6 +2551,8 @@ public class AppOpsManager { OP_MEDIA_ROUTING_CONTROL, OP_READ_SYSTEM_GRAMMATICAL_GENDER, OP_RUN_BACKUP_JOBS, OP_ARCHIVE_ICON_OVERLAY, OP_UNARCHIVAL_CONFIRMATION, }; static final AppOpInfo[] sAppOpInfos = new AppOpInfo[]{ Loading Loading @@ -2979,6 +3012,12 @@ public class AppOpsManager { .build(), new AppOpInfo.Builder(OP_RUN_BACKUP_JOBS, OPSTR_RUN_BACKUP_JOBS, "RUN_BACKUP_JOBS") .setPermission(Manifest.permission.RUN_BACKUP_JOBS).build(), new AppOpInfo.Builder(OP_ARCHIVE_ICON_OVERLAY, OPSTR_ARCHIVE_ICON_OVERLAY, "ARCHIVE_ICON_OVERLAY") .setDefaultMode(MODE_ALLOWED).build(), new AppOpInfo.Builder(OP_UNARCHIVAL_CONFIRMATION, OPSTR_UNARCHIVAL_CONFIRMATION, "UNARCHIVAL_CONFIRMATION") .setDefaultMode(MODE_ALLOWED).build(), }; // The number of longs needed to form a full bitmask of app ops Loading Loading @@ -3113,7 +3152,7 @@ public class AppOpsManager { /** * Retrieve the permission associated with an operation, or null if there is not one. * * @param op The operation name. * * @hide Loading core/java/android/app/ApplicationPackageManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -4032,7 +4032,8 @@ public class ApplicationPackageManager extends PackageManager { private Drawable getArchivedAppIcon(String packageName) { try { return new BitmapDrawable(null, mPM.getArchivedAppIcon(packageName, new UserHandle(getUserId()))); mPM.getArchivedAppIcon(packageName, new UserHandle(getUserId()), mContext.getPackageName())); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading core/java/android/content/pm/ILauncherApps.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -128,4 +128,6 @@ interface ILauncherApps { /** Unregister a callback, so that it won't be called when LauncherApps dumps. */ void unRegisterDumpCallback(IDumpCallback cb); void setArchiveCompatibilityOptions(boolean enableIconOverlay, boolean enableUnarchivalConfirmation); } core/java/android/content/pm/IPackageManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -840,7 +840,7 @@ interface IPackageManager { ArchivedPackageParcel getArchivedPackage(in String packageName, int userId); Bitmap getArchivedAppIcon(String packageName, in UserHandle user); Bitmap getArchivedAppIcon(String packageName, in UserHandle user, String callingPackageName); boolean isAppArchivable(String packageName, in UserHandle user); } Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -12391,6 +12391,7 @@ package android.content.pm { method 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); method public android.content.pm.LauncherActivityInfo resolveActivity(android.content.Intent, android.os.UserHandle); method @FlaggedApi("android.content.pm.archiving") public void setArchiveCompatibilityOptions(boolean, boolean); method public boolean shouldHideFromSuggestions(@NonNull String, @NonNull android.os.UserHandle); method public void startAppDetailsActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle); method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
core/java/android/app/AppOpsManager.java +41 −2 Original line number Diff line number Diff line Loading @@ -1555,9 +1555,24 @@ public class AppOpsManager { */ public static final int OP_RUN_BACKUP_JOBS = AppProtoEnums.APP_OP_RUN_BACKUP_JOBS; /** * Whether the app has enabled to receive the icon overlay for fetching archived apps. * * @hide */ public static final int OP_ARCHIVE_ICON_OVERLAY = AppProtoEnums.APP_OP_ARCHIVE_ICON_OVERLAY; /** * Whether the app has enabled compatibility support for unarchival. * * @hide */ public static final int OP_UNARCHIVAL_CONFIRMATION = AppProtoEnums.APP_OP_UNARCHIVAL_CONFIRMATION; /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public static final int _NUM_OP = 145; public static final int _NUM_OP = 147; /** * All app ops represented as strings. Loading Loading @@ -1708,6 +1723,8 @@ public class AppOpsManager { OPSTR_RESERVED_FOR_TESTING, OPSTR_RAPID_CLEAR_NOTIFICATIONS_BY_LISTENER, OPSTR_RUN_BACKUP_JOBS, OPSTR_ARCHIVE_ICON_OVERLAY, OPSTR_UNARCHIVAL_CONFIRMATION, }) public @interface AppOpString {} Loading Loading @@ -2047,6 +2064,20 @@ public class AppOpsManager { @FlaggedApi(Flags.FLAG_ENABLE_PRIVILEGED_ROUTING_FOR_MEDIA_ROUTING_CONTROL) public static final String OPSTR_MEDIA_ROUTING_CONTROL = "android:media_routing_control"; /** * Whether the app has enabled to receive the icon overlay for fetching archived apps. * * @hide */ public static final String OPSTR_ARCHIVE_ICON_OVERLAY = "android:archive_icon_overlay"; /** * Whether the app has enabled compatibility support for unarchival. * * @hide */ public static final String OPSTR_UNARCHIVAL_CONFIRMATION = "android:unarchival_support"; /** * AppOp granted to apps that we are started via {@code am instrument -e --no-isolated-storage} * Loading Loading @@ -2520,6 +2551,8 @@ public class AppOpsManager { OP_MEDIA_ROUTING_CONTROL, OP_READ_SYSTEM_GRAMMATICAL_GENDER, OP_RUN_BACKUP_JOBS, OP_ARCHIVE_ICON_OVERLAY, OP_UNARCHIVAL_CONFIRMATION, }; static final AppOpInfo[] sAppOpInfos = new AppOpInfo[]{ Loading Loading @@ -2979,6 +3012,12 @@ public class AppOpsManager { .build(), new AppOpInfo.Builder(OP_RUN_BACKUP_JOBS, OPSTR_RUN_BACKUP_JOBS, "RUN_BACKUP_JOBS") .setPermission(Manifest.permission.RUN_BACKUP_JOBS).build(), new AppOpInfo.Builder(OP_ARCHIVE_ICON_OVERLAY, OPSTR_ARCHIVE_ICON_OVERLAY, "ARCHIVE_ICON_OVERLAY") .setDefaultMode(MODE_ALLOWED).build(), new AppOpInfo.Builder(OP_UNARCHIVAL_CONFIRMATION, OPSTR_UNARCHIVAL_CONFIRMATION, "UNARCHIVAL_CONFIRMATION") .setDefaultMode(MODE_ALLOWED).build(), }; // The number of longs needed to form a full bitmask of app ops Loading Loading @@ -3113,7 +3152,7 @@ public class AppOpsManager { /** * Retrieve the permission associated with an operation, or null if there is not one. * * @param op The operation name. * * @hide Loading
core/java/android/app/ApplicationPackageManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -4032,7 +4032,8 @@ public class ApplicationPackageManager extends PackageManager { private Drawable getArchivedAppIcon(String packageName) { try { return new BitmapDrawable(null, mPM.getArchivedAppIcon(packageName, new UserHandle(getUserId()))); mPM.getArchivedAppIcon(packageName, new UserHandle(getUserId()), mContext.getPackageName())); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading
core/java/android/content/pm/ILauncherApps.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -128,4 +128,6 @@ interface ILauncherApps { /** Unregister a callback, so that it won't be called when LauncherApps dumps. */ void unRegisterDumpCallback(IDumpCallback cb); void setArchiveCompatibilityOptions(boolean enableIconOverlay, boolean enableUnarchivalConfirmation); }
core/java/android/content/pm/IPackageManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -840,7 +840,7 @@ interface IPackageManager { ArchivedPackageParcel getArchivedPackage(in String packageName, int userId); Bitmap getArchivedAppIcon(String packageName, in UserHandle user); Bitmap getArchivedAppIcon(String packageName, in UserHandle user, String callingPackageName); boolean isAppArchivable(String packageName, in UserHandle user); }