Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1ab950b authored by Priyanka Advani's avatar Priyanka Advani Committed by Android (Google) Code Review
Browse files

Revert "Add OEM compatability options for archiving."

Revert submission 25784810-archiving.oemCompat

Reason for revert: Probable culprit for b/321780351. Will be running through ABTD for confirmation and before submitting the revert.

Reverted changes: /q/submissionid:25784810-archiving.oemCompat

Change-Id: I3f95707ab92008250f86025a5d2ba39ec98f9cec
parent bd96f655
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -12316,7 +12316,6 @@ 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);
+2 −41
Original line number Diff line number Diff line
@@ -1547,24 +1547,9 @@ public class AppOpsManager {
    public static final int OP_READ_SYSTEM_GRAMMATICAL_GENDER =
            AppProtoEnums.APP_OP_READ_SYSTEM_GRAMMATICAL_GENDER;

    /**
     * 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 = 146;
    public static final int _NUM_OP = 144;

    /**
     * All app ops represented as strings.
@@ -1714,8 +1699,6 @@ public class AppOpsManager {
            OPSTR_ENABLE_MOBILE_DATA_BY_USER,
            OPSTR_RESERVED_FOR_TESTING,
            OPSTR_RAPID_CLEAR_NOTIFICATIONS_BY_LISTENER,
            OPSTR_ARCHIVE_ICON_OVERLAY,
            OPSTR_UNARCHIVAL_CONFIRMATION,
    })
    public @interface AppOpString {}

@@ -2055,20 +2038,6 @@ 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}
     *
@@ -2533,8 +2502,6 @@ public class AppOpsManager {
            OP_RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA,
            OP_MEDIA_ROUTING_CONTROL,
            OP_READ_SYSTEM_GRAMMATICAL_GENDER,
            OP_ARCHIVE_ICON_OVERLAY,
            OP_UNARCHIVAL_CONFIRMATION,
    };

    static final AppOpInfo[] sAppOpInfos = new AppOpInfo[]{
@@ -2991,12 +2958,6 @@ public class AppOpsManager {
                OPSTR_READ_SYSTEM_GRAMMATICAL_GENDER, "READ_SYSTEM_GRAMMATICAL_GENDER")
                .setPermission(Manifest.permission.READ_SYSTEM_GRAMMATICAL_GENDER)
                .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
@@ -3131,7 +3092,7 @@ public class AppOpsManager {

    /**
     * Retrieve the permission associated with an operation, or null if there is not one.

     *
     * @param op The operation name.
     *
     * @hide
+1 −2
Original line number Diff line number Diff line
@@ -4032,8 +4032,7 @@ public class ApplicationPackageManager extends PackageManager {
    private Drawable getArchivedAppIcon(String packageName) {
        try {
            return new BitmapDrawable(null,
                    mPM.getArchivedAppIcon(packageName, new UserHandle(getUserId()),
                            mContext.getPackageName()));
                    mPM.getArchivedAppIcon(packageName, new UserHandle(getUserId())));
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
+0 −2
Original line number Diff line number Diff line
@@ -128,6 +128,4 @@ 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);
}
+1 −1
Original line number Diff line number Diff line
@@ -840,7 +840,7 @@ interface IPackageManager {

    ArchivedPackageParcel getArchivedPackage(in String packageName, int userId);

    Bitmap getArchivedAppIcon(String packageName, in UserHandle user, String callingPackageName);
    Bitmap getArchivedAppIcon(String packageName, in UserHandle user);

    boolean isAppArchivable(String packageName, in UserHandle user);
}
Loading