Set the hiddenApiRestrictionOffset in the new DexBackedDexFile constructor

This fixes the build. That's what I get for rebasing changes and not
testing.
This commit is contained in:
Ben Gruver 2020-02-02 19:45:08 -08:00
parent 8eb2595f87
commit 49f7e26507

View File

@ -99,6 +99,13 @@ public class DexBackedDexFile implements DexFile {
classCount = dexBuffer.readSmallUint(HeaderItem.CLASS_COUNT_OFFSET);
classStartOffset = dexBuffer.readSmallUint(HeaderItem.CLASS_START_OFFSET);
mapOffset = dexBuffer.readSmallUint(HeaderItem.MAP_OFFSET);
MapItem mapItem = getMapItemForSection(ItemType.HIDDENAPI_CLASS_DATA_ITEM);
if (mapItem != null) {
hiddenApiRestrictionsOffset = mapItem.getOffset();
} else {
hiddenApiRestrictionsOffset = NO_OFFSET;
}
}
protected DexBackedDexFile(@Nullable Opcodes opcodes, @Nonnull DexBuffer dexBuffer, @Nonnull DexBuffer dataBuffer, int offset, boolean verifyMagic) {