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

Commit f9e35bc6 authored by Michal Karpinski's avatar Michal Karpinski Committed by Android (Google) Code Review
Browse files

Merge "Support bmgr wipe also for full backup apps"

parents e4c5e3b5 92c87568
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2357,7 +2357,7 @@ public class BackupManagerService implements BackupManagerServiceInterface {

        // If the caller does not hold the BACKUP permission, it can only request a
        // wipe of its own backed-up data.
        HashSet<String> apps;
        Set<String> apps;
        if ((mContext.checkPermission(android.Manifest.permission.BACKUP, Binder.getCallingPid(),
                Binder.getCallingUid())) == PackageManager.PERMISSION_DENIED) {
            apps = mBackupParticipants.get(Binder.getCallingUid());
@@ -2365,10 +2365,9 @@ public class BackupManagerService implements BackupManagerServiceInterface {
            // a caller with full permission can ask to back up any participating app
            // !!! TODO: allow data-clear of ANY app?
            if (MORE_DEBUG) Slog.v(TAG, "Privileged caller, allowing clear of other apps");
            apps = SparseArrayUtils.union(mBackupParticipants);
            apps = mProcessedPackagesJournal.getPackagesCopy();
        }

        // Is the given app an available participant?
        if (apps.contains(packageName)) {
            // found it; fire off the clear request
            if (MORE_DEBUG) Slog.v(TAG, "Found the app - running clear process");