From 1e5dc3006ee812ba165d84dfc60e7d888fba264e Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Mon, 7 Dec 2015 07:34:56 -0600 Subject: [PATCH] Add headerSize & chunkSize to Header class --- .../java/brut/androlib/res/decoder/ARSCDecoder.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java index e169bcd0..f30e7234 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java @@ -448,11 +448,13 @@ public class ARSCDecoder { public static class Header { public final short type; + public final int headerSize; public final int chunkSize; - public Header(short type, int size) { + public Header(short type, int headerSize, int chunkSize) { this.type = type; - this.chunkSize = size; + this.headerSize = headerSize; + this.chunkSize = chunkSize; } public static Header read(ExtDataInput in) throws IOException { @@ -460,10 +462,9 @@ public class ARSCDecoder { try { type = in.readShort(); } catch (EOFException ex) { - return new Header(TYPE_NONE, 0); + return new Header(TYPE_NONE, 0, 0); } - in.skipBytes(2); - return new Header(type, in.readInt()); + return new Header(type, in.readShort(), in.readInt()); } public final static short TYPE_NONE = -1, TYPE_TABLE = 0x0002,