mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 13:57:46 +01:00
Merge pull request #2066 from iBotPeaches/issue-2045
Support for SDK_Q shorthand
This commit is contained in:
commit
73ac0d96fb
@ -633,6 +633,8 @@ final public class AndrolibResources {
|
|||||||
return ResConfigFlags.SDK_OREO;
|
return ResConfigFlags.SDK_OREO;
|
||||||
case "P":
|
case "P":
|
||||||
return ResConfigFlags.SDK_P;
|
return ResConfigFlags.SDK_P;
|
||||||
|
case "Q":
|
||||||
|
return ResConfigFlags.SDK_Q;
|
||||||
default:
|
default:
|
||||||
return Integer.parseInt(sdkVersion);
|
return Integer.parseInt(sdkVersion);
|
||||||
}
|
}
|
||||||
|
@ -538,6 +538,10 @@ public class ResConfigFlags {
|
|||||||
public final static byte SDK_OREO_MR1 = 27;
|
public final static byte SDK_OREO_MR1 = 27;
|
||||||
public final static byte SDK_P = 28;
|
public final static byte SDK_P = 28;
|
||||||
|
|
||||||
|
// AOSP has this as 10,000 for dev purposes.
|
||||||
|
// platform_frameworks_base/commit/ad5b4ba2a2dda066dbefec4195b86747e3d7d225#diff-b2b93844110603a7b050476c83c1ee3a
|
||||||
|
public final static int SDK_Q = 10000;
|
||||||
|
|
||||||
public final static byte ORIENTATION_ANY = 0;
|
public final static byte ORIENTATION_ANY = 0;
|
||||||
public final static byte ORIENTATION_PORT = 1;
|
public final static byte ORIENTATION_PORT = 1;
|
||||||
public final static byte ORIENTATION_LAND = 2;
|
public final static byte ORIENTATION_LAND = 2;
|
||||||
|
@ -86,4 +86,15 @@ public class InvalidSdkBoundingTest extends BaseTest {
|
|||||||
androlibResources.setSdkInfo(sdkInfo);
|
androlibResources.setSdkInfo(sdkInfo);
|
||||||
assertEquals("26", androlibResources.checkTargetSdkVersionBounds());
|
assertEquals("26", androlibResources.checkTargetSdkVersionBounds());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void checkForSdkQInsaneTestValue() {
|
||||||
|
AndrolibResources androlibResources = new AndrolibResources();
|
||||||
|
|
||||||
|
Map<String, String> sdkInfo = new LinkedHashMap<>();
|
||||||
|
sdkInfo.put("targetSdkVersion", "Q");
|
||||||
|
|
||||||
|
androlibResources.setSdkInfo(sdkInfo);
|
||||||
|
assertEquals("10000", androlibResources.checkTargetSdkVersionBounds());
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user