diff --git a/brut.apktool.smali/dexlib2/src/main/java/org/jf/dexlib2/DexFileFactory.java b/brut.apktool.smali/dexlib2/src/main/java/org/jf/dexlib2/DexFileFactory.java index a1ddee2e..113b60a3 100644 --- a/brut.apktool.smali/dexlib2/src/main/java/org/jf/dexlib2/DexFileFactory.java +++ b/brut.apktool.smali/dexlib2/src/main/java/org/jf/dexlib2/DexFileFactory.java @@ -44,12 +44,23 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipFile; public final class DexFileFactory { + @Nonnull + public static DexBackedDexFile loadDexFile(String path, int api) + throws IOException { + return loadDexFile(path, api, false); + } + @Nonnull public static DexBackedDexFile loadDexFile(String path, int api, boolean experimental) throws IOException { return loadDexFile(new File(path), "classes.dex", new Opcodes(api, experimental)); } + @Nonnull + public static DexBackedDexFile loadDexFile(File dexFile, int api) throws IOException { + return loadDexFile(dexFile, api, false); + } + @Nonnull public static DexBackedDexFile loadDexFile(File dexFile, int api, boolean experimental) throws IOException { diff --git a/brut.apktool.smali/dexlib2/src/main/java/org/jf/dexlib2/Opcodes.java b/brut.apktool.smali/dexlib2/src/main/java/org/jf/dexlib2/Opcodes.java index dd876813..e718e275 100644 --- a/brut.apktool.smali/dexlib2/src/main/java/org/jf/dexlib2/Opcodes.java +++ b/brut.apktool.smali/dexlib2/src/main/java/org/jf/dexlib2/Opcodes.java @@ -40,6 +40,10 @@ public class Opcodes { private final Opcode[] opcodesByValue; private final HashMap opcodesByName; + public Opcodes(int api) { + this(api, false); + } + public Opcodes(int api, boolean experimental) { opcodesByValue = new Opcode[256]; opcodesByName = Maps.newHashMap();