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

Commit 7dd04366 authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

Merge "Frameworks/base: Extract packages after cache pruning" into nyc-dev

am: fb5f2e57

* commit 'fb5f2e57':
  Frameworks/base: Extract packages after cache pruning
parents a7318a00 fb5f2e57
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -6897,7 +6897,8 @@ public class PackageManagerService extends IPackageManager.Stub {
        // Extract pacakges only if profile-guided compilation is enabled because
        // otherwise BackgroundDexOptService will not dexopt them later.
        if (!isUpgrade()) {
        boolean prunedCache = VMRuntime.didPruneDalvikCache();
        if (!isUpgrade() && !prunedCache) {
            return;
        }
@@ -6925,8 +6926,11 @@ public class PackageManagerService extends IPackageManager.Stub {
            }
            if (PackageDexOptimizer.canOptimizePackage(pkg)) {
                // If the cache was pruned, any compiled odex files will likely be out of date
                // and would have to be patched (would be SELF_PATCHOAT, which is deprecated).
                // Instead, force the extraction in this case.
                performDexOpt(pkg.packageName, null /* instructionSet */,
                         false /* useProfiles */, true /* extractOnly */, false /* force */);
                         false /* useProfiles */, true /* extractOnly */, prunedCache);
            }
        }
    }