mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-09 10:14:25 +02:00
remove hardcoded htc stuff
This commit is contained in:
parent
9a6fd7de63
commit
3a5530e67b
@ -32,7 +32,7 @@ public class ResConfigFlags {
|
|||||||
|
|
||||||
public final byte orientation;
|
public final byte orientation;
|
||||||
public final byte touchscreen;
|
public final byte touchscreen;
|
||||||
public final short density;
|
public final int density;
|
||||||
|
|
||||||
public final byte keyboard;
|
public final byte keyboard;
|
||||||
public final byte navigation;
|
public final byte navigation;
|
||||||
@ -80,7 +80,7 @@ public class ResConfigFlags {
|
|||||||
|
|
||||||
public ResConfigFlags(short mcc, short mnc, char[] language,
|
public ResConfigFlags(short mcc, short mnc, char[] language,
|
||||||
char[] country, short layoutDirection, byte orientation,
|
char[] country, short layoutDirection, byte orientation,
|
||||||
byte touchscreen, short density, byte keyboard, byte navigation,
|
byte touchscreen, int density, byte keyboard, byte navigation,
|
||||||
byte inputFlags, short screenWidth, short screenHeight,
|
byte inputFlags, short screenWidth, short screenHeight,
|
||||||
short sdkVersion, byte screenLayout, byte uiMode,
|
short sdkVersion, byte screenLayout, byte uiMode,
|
||||||
short smallestScreenWidthDp, short screenWidthDp,
|
short smallestScreenWidthDp, short screenWidthDp,
|
||||||
|
@ -247,12 +247,7 @@ public class ARSCDecoder {
|
|||||||
byte orientation = mIn.readByte();
|
byte orientation = mIn.readByte();
|
||||||
byte touchscreen = mIn.readByte();
|
byte touchscreen = mIn.readByte();
|
||||||
|
|
||||||
short density = mIn.readShort();
|
int density = mIn.readUnsignedShort();
|
||||||
// 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 keyboard = mIn.readByte();
|
||||||
byte navigation = mIn.readByte();
|
byte navigation = mIn.readByte();
|
||||||
@ -276,15 +271,13 @@ public class ARSCDecoder {
|
|||||||
|
|
||||||
short screenWidthDp = 0;
|
short screenWidthDp = 0;
|
||||||
short screenHeightDp = 0;
|
short screenHeightDp = 0;
|
||||||
|
|
||||||
if (size >= 36) {
|
if (size >= 36) {
|
||||||
screenWidthDp = mIn.readShort();
|
screenWidthDp = mIn.readShort();
|
||||||
screenHeightDp = mIn.readShort();
|
screenHeightDp = mIn.readShort();
|
||||||
}
|
}
|
||||||
|
|
||||||
short layoutDirection = 0;
|
short layoutDirection = 0;
|
||||||
if (size >= 38 && sdkVersion >= 17
|
if (size >= 38) {
|
||||||
&& !this.mPkg.getName().equalsIgnoreCase("com.htc")) {
|
|
||||||
layoutDirection = mIn.readShort();
|
layoutDirection = mIn.readShort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user