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

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

Merge "Moves clear data out of commit"

parents ed54d1a9 b7b45155
Loading
Loading
Loading
Loading
+3 −10
Original line number Original line Diff line number Diff line
@@ -15215,14 +15215,8 @@ public class PackageManagerService extends IPackageManager.Stub
                            pkgList.add(oldPackage.applicationInfo.packageName);
                            pkgList.add(oldPackage.applicationInfo.packageName);
                            sendResourcesChangedBroadcast(false, true, pkgList, uidArray, null);
                            sendResourcesChangedBroadcast(false, true, pkgList, uidArray, null);
                        }
                        }
                        clearAppDataLIF(pkg, UserHandle.USER_ALL, StorageManager.FLAG_STORAGE_DE
                                | StorageManager.FLAG_STORAGE_CE
                                | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
                    }
                    }
                    // Update the in-memory copy of the previous code paths.
                    // Update the in-memory copy of the previous code paths.
                    PackageSetting ps1 = mSettings.mPackages.get(
                    PackageSetting ps1 = mSettings.mPackages.get(
                            reconciledPkg.prepareResult.existingPackage.packageName);
                            reconciledPkg.prepareResult.existingPackage.packageName);
@@ -15426,7 +15420,8 @@ public class PackageManagerService extends IPackageManager.Stub
    /**
    /**
     * On successful install, executes remaining steps after commit completes and the package lock
     * On successful install, executes remaining steps after commit completes and the package lock
     * is released.
     * is released. These are typically more expensive or require calls to installd, which often
     * locks on {@link #mPackages}.
     */
     */
    private void executePostCommitSteps(CommitRequest commitRequest) {
    private void executePostCommitSteps(CommitRequest commitRequest) {
        for (ReconciledPackage reconciledPkg : commitRequest.reconciledPackages.values()) {
        for (ReconciledPackage reconciledPkg : commitRequest.reconciledPackages.values()) {
@@ -16155,7 +16150,6 @@ public class PackageManagerService extends IPackageManager.Stub
        try {
        try {
            final PackageParser.Package existingPackage;
            final PackageParser.Package existingPackage;
            String renamedPackage = null;
            String renamedPackage = null;
            boolean clearCodeCache = false;
            boolean sysPkg = false;
            boolean sysPkg = false;
            String targetVolumeUuid = volumeUuid;
            String targetVolumeUuid = volumeUuid;
            int targetScanFlags = scanFlags;
            int targetScanFlags = scanFlags;
@@ -16376,7 +16370,6 @@ public class PackageManagerService extends IPackageManager.Stub
                        Slog.d(TAG, "replaceSystemPackageLI: new=" + pkg
                        Slog.d(TAG, "replaceSystemPackageLI: new=" + pkg
                                + ", old=" + oldPackage);
                                + ", old=" + oldPackage);
                    }
                    }
                    clearCodeCache = true;
                    res.setReturnCode(PackageManager.INSTALL_SUCCEEDED);
                    res.setReturnCode(PackageManager.INSTALL_SUCCEEDED);
                    pkg.setApplicationInfoFlags(ApplicationInfo.FLAG_UPDATED_SYSTEM_APP,
                    pkg.setApplicationInfoFlags(ApplicationInfo.FLAG_UPDATED_SYSTEM_APP,
                            ApplicationInfo.FLAG_UPDATED_SYSTEM_APP);
                            ApplicationInfo.FLAG_UPDATED_SYSTEM_APP);
@@ -16432,7 +16425,7 @@ public class PackageManagerService extends IPackageManager.Stub
            shouldCloseFreezerBeforeReturn = false;
            shouldCloseFreezerBeforeReturn = false;
            return new PrepareResult(args.installReason, targetVolumeUuid, installerPackageName,
            return new PrepareResult(args.installReason, targetVolumeUuid, installerPackageName,
                    args.user, replace, targetScanFlags, targetParseFlags, existingPackage, pkg,
                    args.user, replace, targetScanFlags, targetParseFlags, existingPackage, pkg,
                    clearCodeCache, sysPkg, renamedPackage, freezer);
                    replace /* clearCodeCache */, sysPkg, renamedPackage, freezer);
        } finally {
        } finally {
            if (shouldCloseFreezerBeforeReturn) {
            if (shouldCloseFreezerBeforeReturn) {
                freezer.close();
                freezer.close();