mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-05 17:45:52 +01:00
Don't generate sdkVersion ("-v") qualifiers if they're "natural".
This commit is contained in:
parent
6d923adf81
commit
5087e915e1
@ -231,13 +231,28 @@ public class ResConfigFlags {
|
||||
ret.append(String.format("-%dx%d", screenHeight, screenWidth));
|
||||
}
|
||||
}
|
||||
if (sdkVersion != 0) {
|
||||
if (sdkVersion > getNaturalSdkVersionRequirement()) {
|
||||
ret.append("-v").append(sdkVersion);
|
||||
}
|
||||
|
||||
return ret.toString();
|
||||
}
|
||||
|
||||
private short getNaturalSdkVersionRequirement() {
|
||||
if (
|
||||
(uiMode & (MASK_UI_MODE_TYPE | MASK_UI_MODE_NIGHT)) != 0
|
||||
) {
|
||||
return 8;
|
||||
}
|
||||
if (
|
||||
(screenLayout & (MASK_SCREENSIZE | MASK_SCREENLONG)) != 0
|
||||
|| density != DENSITY_DEFAULT
|
||||
) {
|
||||
return 4;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ! getQualifiers().equals("") ? getQualifiers() : "[DEFAULT]";
|
||||
|
Loading…
Reference in New Issue
Block a user