Make sure the api level is set before reading in the dex file

This commit is contained in:
Ben Gruver 2011-11-20 23:13:55 -08:00
parent 4d3b3311e1
commit 0da8e11d11

View File

@ -259,6 +259,8 @@ public class main {
System.exit(1); System.exit(1);
} }
Opcode.updateMapsForApiLevel(apiLevel);
//Read in and parse the dex file //Read in and parse the dex file
DexFile dexFile = new DexFile(dexFileFile, !fixRegisters, false); DexFile dexFile = new DexFile(dexFileFile, !fixRegisters, false);
@ -288,8 +290,6 @@ public class main {
bootClassPathDirsArray[i] = bootClassPathDirs.get(i); bootClassPathDirsArray[i] = bootClassPathDirs.get(i);
} }
Opcode.updateMapsForApiLevel(apiLevel);
baksmali.disassembleDexFile(dexFileFile.getPath(), dexFile, deodex, outputDirectory, baksmali.disassembleDexFile(dexFileFile.getPath(), dexFile, deodex, outputDirectory,
bootClassPathDirsArray, bootClassPath, extraBootClassPathEntries.toString(), bootClassPathDirsArray, bootClassPath, extraBootClassPathEntries.toString(),
noParameterRegisters, useLocalsDirective, useSequentialLabels, outputDebugInfo, addCodeOffsets, noParameterRegisters, useLocalsDirective, useSequentialLabels, outputDebugInfo, addCodeOffsets,