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

Commit c1b94282 authored by Todd Kennedy's avatar Todd Kennedy Committed by android-build-merger
Browse files

Merge "Always invoke callback" into oc-mr1-dev am: 71b304f6

am: 5c6c1c9c

Change-Id: I61e560b9196ea08b7119a6aed69a2aa355f7f6f3
parents bf2a79b0 5c6c1c9c
Loading
Loading
Loading
Loading
+23 −21
Original line number Diff line number Diff line
@@ -20243,10 +20243,8 @@ public class PackageManagerService extends IPackageManager.Stub
                true /* requireFullPermission */, false /* checkShell */, "clear application data");
        final PackageSetting ps = mSettings.getPackageLPr(packageName);
        if (ps != null && filterAppAccessLPr(ps, callingUid, userId)) {
            return;
        }
        if (mProtectedPackages.isPackageDataProtected(userId, packageName)) {
        final boolean filterApp = (ps != null && filterAppAccessLPr(ps, callingUid, userId));
        if (!filterApp && mProtectedPackages.isPackageDataProtected(userId, packageName)) {
            throw new SecurityException("Cannot clear data for a protected package: "
                    + packageName);
        }
@@ -20255,6 +20253,7 @@ public class PackageManagerService extends IPackageManager.Stub
            public void run() {
                mHandler.removeCallbacks(this);
                final boolean succeeded;
                if (!filterApp) {
                    try (PackageFreezer freezer = freezePackage(packageName,
                            "clearApplicationUserData")) {
                        synchronized (mInstallLock) {
@@ -20274,6 +20273,9 @@ public class PackageManagerService extends IPackageManager.Stub
                            dsm.checkMemory();
                        }
                    }
                } else {
                    succeeded = false;
                }
                if (observer != null) {
                    try {
                        observer.onRemoveCompleted(packageName, succeeded);