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

Commit fc5f9f51 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't kill apps when only clearing caches." into nyc-dev

parents 49a54366 7b6c731f
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -16054,16 +16054,15 @@ public class PackageManagerService extends IPackageManager.Stub {
        // Queue up an async operation since the package deletion may take a little while.
        mHandler.post(new Runnable() {
            public void run() {
                try (PackageFreezer freezer = freezePackage(packageName,
                        "deleteApplicationCacheFiles")) {
                synchronized (mInstallLock) {
                    final int flags = StorageManager.FLAG_STORAGE_DE
                            | StorageManager.FLAG_STORAGE_CE;
                    // We're only clearing cache files, so we don't care if the
                    // app is unfrozen and still able to run
                    clearAppDataLIF(pkg, userId, flags | Installer.FLAG_CLEAR_CACHE_ONLY);
                    clearAppDataLIF(pkg, userId, flags | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
                }
                clearExternalStorageDataSync(packageName, userId, false);
                }
                if (observer != null) {
                    try {
                        observer.onRemoveCompleted(packageName, true);