Notify IORap without including packages for secondary dex opt. am: 8e41a2debb

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

Change-Id: I08eec3f730a71e87d5bb7febc0174eb12cbd36be
This commit is contained in:
yawanng
2020-07-31 19:45:13 +00:00
committed by Automerger Merge Worker

View File

@@ -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);
}
}