mirror of
https://github.com/revanced/multidexlib2.git
synced 2025-05-01 23:24:36 +02:00
Use the automatic dex version handling implemented in dexlib2 2.2.4
This commit is contained in:
parent
232161206a
commit
9c3a656b00
@ -57,11 +57,8 @@ public class RawDexIO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static DexBackedDexFile readRawDexFile(byte[] buf, int offset, Opcodes opcodes) throws IOException {
|
public static DexBackedDexFile readRawDexFile(byte[] buf, int offset, Opcodes opcodes) throws IOException {
|
||||||
|
// This method now relies on the automatic dex version handling implemented in dexlib2 since version 2.2.4.
|
||||||
DexUtil.verifyDexHeader(buf, offset);
|
DexUtil.verifyDexHeader(buf, offset);
|
||||||
if (opcodes == null) {
|
|
||||||
int dexVersion = HeaderItem.getVersion(buf, offset);
|
|
||||||
opcodes = OpcodeUtils.getOpcodesFromDexVersion(dexVersion);
|
|
||||||
};
|
|
||||||
return new DexBackedDexFile(opcodes, buf, offset);
|
return new DexBackedDexFile(opcodes, buf, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user