Merge "Cleanup code given PATCHOAT_FOR_RELOCATION has been removed."
am: 8582826f8d
Change-Id: If5d55f55d86c4e4711e36a7f517336fbdda96e3d
This commit is contained in:
@@ -217,26 +217,11 @@ class PackageDexOptimizer {
|
|||||||
dexoptNeeded);
|
dexoptNeeded);
|
||||||
}
|
}
|
||||||
|
|
||||||
final String dexoptType;
|
if (dexoptNeeded == DexFile.NO_DEXOPT_NEEDED) {
|
||||||
String oatDir = null;
|
|
||||||
boolean isOdexLocation = (dexoptNeeded < 0);
|
|
||||||
switch (Math.abs(dexoptNeeded)) {
|
|
||||||
case DexFile.NO_DEXOPT_NEEDED:
|
|
||||||
continue;
|
continue;
|
||||||
case DexFile.DEX2OAT_FROM_SCRATCH:
|
|
||||||
case DexFile.DEX2OAT_FOR_BOOT_IMAGE:
|
|
||||||
case DexFile.DEX2OAT_FOR_FILTER:
|
|
||||||
case DexFile.DEX2OAT_FOR_RELOCATION:
|
|
||||||
dexoptType = "dex2oat";
|
|
||||||
oatDir = createOatDirIfSupported(pkg, dexCodeInstructionSet);
|
|
||||||
break;
|
|
||||||
case DexFile.PATCHOAT_FOR_RELOCATION:
|
|
||||||
dexoptType = "patchoat";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new IllegalStateException("Invalid dexopt:" + dexoptNeeded);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String oatDir = createOatDirIfSupported(pkg, dexCodeInstructionSet);
|
||||||
String sharedLibrariesPath = null;
|
String sharedLibrariesPath = null;
|
||||||
if (sharedLibraries != null && sharedLibraries.length != 0) {
|
if (sharedLibraries != null && sharedLibraries.length != 0) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@@ -248,7 +233,7 @@ class PackageDexOptimizer {
|
|||||||
}
|
}
|
||||||
sharedLibrariesPath = sb.toString();
|
sharedLibrariesPath = sb.toString();
|
||||||
}
|
}
|
||||||
Log.i(TAG, "Running dexopt (" + dexoptType + ") on: " + path + " pkg="
|
Log.i(TAG, "Running dexopt on: " + path + " pkg="
|
||||||
+ pkg.applicationInfo.packageName + " isa=" + dexCodeInstructionSet
|
+ pkg.applicationInfo.packageName + " isa=" + dexCodeInstructionSet
|
||||||
+ " vmSafeMode=" + vmSafeMode + " debuggable=" + debuggable
|
+ " vmSafeMode=" + vmSafeMode + " debuggable=" + debuggable
|
||||||
+ " target-filter=" + targetCompilerFilter + " oatDir = " + oatDir
|
+ " target-filter=" + targetCompilerFilter + " oatDir = " + oatDir
|
||||||
|
|||||||
Reference in New Issue
Block a user