Using standard InlineMethodResolver if no custom one is provided.

This commit is contained in:
Izzat Bahadirov
2013-04-22 14:00:49 -04:00
parent d6737943e1
commit 9c72df65f7
3 changed files with 9 additions and 1 deletions

View File

@ -33,6 +33,7 @@ package org.jf.dexlib2.dexbacked;
import com.google.common.io.ByteStreams;
import org.jf.dexlib2.Opcodes;
import org.jf.dexlib2.dexbacked.raw.HeaderItem;
import org.jf.dexlib2.dexbacked.raw.OdexHeaderItem;
import org.jf.dexlib2.dexbacked.util.VariableSizeList;
@ -121,6 +122,10 @@ public class DexBackedOdexFile extends DexBackedDexFile {
}
}
public int getVersion() {
return HeaderItem.getVersion(getBuf(), 0);
}
public static class NotAnOdexFile extends RuntimeException {
public NotAnOdexFile() {
}

View File

@ -219,7 +219,7 @@ public class HeaderItem {
return "Invalid";
}
private static int getVersion(byte[] buf, int offset) {
public static int getVersion(byte[] buf, int offset) {
if (buf.length - offset < 8) {
return 0;
}