fix: add development next version (S) - API 31

This commit is contained in:
Connor Tumbleson 2020-09-13 08:52:15 -04:00
parent 6427a28beb
commit 3101a05ef6
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75
3 changed files with 10 additions and 4 deletions

View File

@ -671,6 +671,10 @@ final public class AndrolibResources {
return ResConfigFlags.SDK_P; return ResConfigFlags.SDK_P;
case "Q": case "Q":
return ResConfigFlags.SDK_Q; return ResConfigFlags.SDK_Q;
case "R":
return ResConfigFlags.SDK_R;
case "S":
return ResConfigFlags.SDK_S;
default: default:
return Integer.parseInt(sdkVersion); return Integer.parseInt(sdkVersion);
} }

View File

@ -537,10 +537,12 @@ public class ResConfigFlags {
public final static byte SDK_OREO = 26; public final static byte SDK_OREO = 26;
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;
public final static byte SDK_Q = 29;
public final static byte SDK_R = 30;
// AOSP has this as 10,000 for dev purposes. // AOSP has this as 10,000 for dev purposes.
// platform_frameworks_base/commit/ad5b4ba2a2dda066dbefec4195b86747e3d7d225#diff-b2b93844110603a7b050476c83c1ee3a // platform_frameworks_base/commit/c7a1109a1fe0771d4c9b572dcf178e2779fc4f2d
public final static int SDK_Q = 10000; public final static int SDK_S = 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;

View File

@ -88,11 +88,11 @@ public class InvalidSdkBoundingTest extends BaseTest {
} }
@Test @Test
public void checkForSdkQInsaneTestValue() { public void checkForSdkDevelopmentInsaneTestValue() {
AndrolibResources androlibResources = new AndrolibResources(); AndrolibResources androlibResources = new AndrolibResources();
Map<String, String> sdkInfo = new LinkedHashMap<>(); Map<String, String> sdkInfo = new LinkedHashMap<>();
sdkInfo.put("targetSdkVersion", "Q"); sdkInfo.put("targetSdkVersion", "S");
androlibResources.setSdkInfo(sdkInfo); androlibResources.setSdkInfo(sdkInfo);
assertEquals("10000", androlibResources.checkTargetSdkVersionBounds()); assertEquals("10000", androlibResources.checkTargetSdkVersionBounds());