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

Commit c45b0859 authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Always invoke callback

Change-Id: I5673aaab7381cad56408aa0094007ac10c14d169
Fixes: 62820142
Test: Manual
parent df421a8b
Loading
Loading
Loading
Loading
+23 −21
Original line number Diff line number Diff line
@@ -20139,10 +20139,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);
        }
@@ -20151,6 +20149,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) {
@@ -20170,6 +20169,9 @@ public class PackageManagerService extends IPackageManager.Stub
                            dsm.checkMemory();
                        }
                    }
                } else {
                    succeeded = false;
                }
                if (observer != null) {
                    try {
                        observer.onRemoveCompleted(packageName, succeeded);