Always use the 035 version magic value when writing a dex file

This commit is contained in:
Ben Gruver 2013-10-10 19:37:56 -07:00
parent 7618e1636c
commit 216ca5376b

View File

@ -1172,11 +1172,8 @@ public abstract class DexWriter<
} }
private void writeHeader(@Nonnull DexDataWriter writer, int dataOffset, int fileSize) throws IOException { private void writeHeader(@Nonnull DexDataWriter writer, int dataOffset, int fileSize) throws IOException {
if (api < 14) { // always write the 035 version, there's no reason to use the 036 version for now
writer.write(HeaderItem.MAGIC_VALUES[0]); writer.write(HeaderItem.MAGIC_VALUES[0]);
} else {
writer.write(HeaderItem.MAGIC_VALUES[1]);
}
// checksum placeholder // checksum placeholder
writer.writeInt(0); writer.writeInt(0);