handle com.htc.resources correctly

This commit is contained in:
Connor Tumbleson 2013-03-31 09:05:07 -05:00
parent 4b8ed4c2b1
commit 2e44e3a856

View File

@ -246,7 +246,13 @@ public class ARSCDecoder {
byte orientation = mIn.readByte();
byte touchscreen = mIn.readByte();
short density = mIn.readShort();
// some htc apks have 40 byte configs, with int(s) as density
// we are just gonna ignore the rest of the qualifer for now.
if (this.mPkg.getName().equalsIgnoreCase("com.htc") && size == 40) {
mIn.skipBytes(2);
}
byte keyboard = mIn.readByte();
byte navigation = mIn.readByte();