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 { try {
dexoptNeeded = DexFile.getDexOptNeeded( dexoptNeeded = DexFile.getDexOptNeeded(
classPathElement, instructionSet, "speed", classPathElement, instructionSet, "speed",
false /* newProfile */); false /* newProfile */, false /* downgrade */);
} catch (FileNotFoundException ignored) { } catch (FileNotFoundException ignored) {
// Do not add to the classpath. // Do not add to the classpath.
Log.w(TAG, "Missing classpath element for system server: " + classPathElement); Log.w(TAG, "Missing classpath element for system server: " + classPathElement);

View File

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

View File

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