Merge "Update DexFile#getDexOptNeeded usages to reflect API change"

This commit is contained in:
Shubham Ajmera
2017-07-24 19:11:29 +00:00
committed by Gerrit Code Review
3 changed files with 4 additions and 3 deletions

View File

@@ -512,7 +512,7 @@ public class ZygoteInit {
try {
dexoptNeeded = DexFile.getDexOptNeeded(
classPathElement, instructionSet, "speed",
false /* newProfile */);
false /* newProfile */, false /* downgrade */);
} catch (FileNotFoundException ignored) {
// Do not add to the classpath.
Log.w(TAG, "Missing classpath element for system server: " + classPathElement);

View File

@@ -405,7 +405,8 @@ public class PackageDexOptimizer {
boolean newProfile) {
int dexoptNeeded;
try {
dexoptNeeded = DexFile.getDexOptNeeded(path, isa, compilerFilter, newProfile);
dexoptNeeded = DexFile.getDexOptNeeded(path, isa, compilerFilter, newProfile,
false /* downgrade */);
} catch (IOException ioe) {
Slog.w(TAG, "IOException reading apk: " + path, ioe);
return DEX_OPT_FAILED;

View File

@@ -2264,7 +2264,7 @@ public class PackageManagerService extends IPackageManager.Stub {
int dexoptNeeded = DexFile.getDexOptNeeded(
lib, dexCodeInstructionSet,
getCompilerFilterForReason(REASON_SHARED_APK),
false /* newProfile */);
false /* newProfile */, false /* downgrade */);
if (dexoptNeeded != DexFile.NO_DEXOPT_NEEDED) {
mInstaller.dexopt(lib, Process.SYSTEM_UID, "*",
dexCodeInstructionSet, dexoptNeeded, null,