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

Commit 724d8f17 authored by Calin Juravle's avatar Calin Juravle Committed by Automerger Merge Worker
Browse files

Merge "Notify IORap without including packages for secondary dex opt." into rvc-dev am: eddf0c94

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12280079

Change-Id: I516152d64468fd248b2a8d5dc5127567f538b8b3
parents 4820e9d4 eddf0c94
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -337,6 +337,7 @@ public class BackgroundDexOptService extends JobService {
    private int idleOptimizePackages(PackageManagerService pm, ArraySet<String> pkgs,
            long lowStorageThreshold) {
        ArraySet<String> updatedPackages = new ArraySet<>();
        ArraySet<String> updatedPackagesDueToSecondaryDex = new ArraySet<>();

        try {
            final boolean supportSecondaryDex = supportSecondaryDex();
@@ -391,11 +392,14 @@ public class BackgroundDexOptService extends JobService {
            }

            int secondaryResult = optimizePackages(pm, pkgs, lowStorageThreshold,
                    /*isForPrimaryDex*/ false, updatedPackages);
                    /*isForPrimaryDex*/ false, updatedPackagesDueToSecondaryDex);
            return secondaryResult;
        } finally {
            // Always let the pinner service know about changes.
            notifyPinService(updatedPackages);
            // Only notify IORap the primary dex opt, because we don't want to
            // invalidate traces unnecessary due to b/161633001 and that it's
            // better to have a trace than no trace at all.
            notifyPackagesUpdated(updatedPackages);
        }
    }