Merge "Pass DEXOPT_INSTALL_WITH_DEX_METADATA_FILE for first boot" am: 0ea144f4bf

am: 8deca3f06f

Change-Id: Idefc228d35212f4014e9bb204e54b58c904ee94c
This commit is contained in:
Mathieu Chartier
2018-02-20 20:40:00 +00:00
committed by android-build-merger

View File

@@ -9862,6 +9862,10 @@ public class PackageManagerService extends IPackageManager.Stub
// behave differently than "pm.dexopt.bg-dexopt=speed-profile" but that's a // behave differently than "pm.dexopt.bg-dexopt=speed-profile" but that's a
// trade-off worth doing to save boot time work. // trade-off worth doing to save boot time work.
int dexoptFlags = bootComplete ? DexoptOptions.DEXOPT_BOOT_COMPLETE : 0; int dexoptFlags = bootComplete ? DexoptOptions.DEXOPT_BOOT_COMPLETE : 0;
if (compilationReason == REASON_FIRST_BOOT) {
// TODO: This doesn't cover the upgrade case, we should check for this too.
dexoptFlags |= DexoptOptions.DEXOPT_INSTALL_WITH_DEX_METADATA_FILE;
}
int primaryDexOptStaus = performDexOptTraced(new DexoptOptions( int primaryDexOptStaus = performDexOptTraced(new DexoptOptions(
pkg.packageName, pkg.packageName,
pkgCompilationReason, pkgCompilationReason,