Convert more versions in config to ApiLevel.
The test case I removed is invalid. The codename has had its int
assigned, but the config claims it is not final.
If this ever does need to be supported it's just a matter of making
sure the Q -> 29 mapping (or whatever) in the finalized codenames map
in android/api_levels.go.
Test: treehugger
Bug: http://b/154667674
Change-Id: I4f42ec2fd4a37750519ee3937938a1c65b6bb1e8
diff --git a/java/app_test.go b/java/app_test.go
index 5367971..4347db8 100644
--- a/java/app_test.go
+++ b/java/app_test.go
@@ -1078,6 +1078,7 @@
platformSdkFinal bool
expectedMinSdkVersion string
platformApis bool
+ activeCodenames []string
}{
{
name: "current final SDK",
@@ -1094,6 +1095,7 @@
platformSdkCodename: "OMR1",
platformSdkFinal: false,
expectedMinSdkVersion: "OMR1",
+ activeCodenames: []string{"OMR1"},
},
{
name: "default final SDK",
@@ -1112,11 +1114,14 @@
platformSdkCodename: "OMR1",
platformSdkFinal: false,
expectedMinSdkVersion: "OMR1",
+ activeCodenames: []string{"OMR1"},
},
{
name: "14",
sdkVersion: "14",
expectedMinSdkVersion: "14",
+ platformSdkCodename: "S",
+ activeCodenames: []string{"S"},
},
}
@@ -1137,6 +1142,7 @@
config := testAppConfig(nil, bp, nil)
config.TestProductVariables.Platform_sdk_version = &test.platformSdkInt
config.TestProductVariables.Platform_sdk_codename = &test.platformSdkCodename
+ config.TestProductVariables.Platform_version_active_codenames = test.activeCodenames
config.TestProductVariables.Platform_sdk_final = &test.platformSdkFinal
checkSdkVersion(t, config, test.expectedMinSdkVersion)
@@ -1179,15 +1185,6 @@
platformSdkInt: 29,
platformSdkCodename: "Q",
platformSdkFinal: false,
- deviceCurrentApiLevelForVendorModules: "current",
- expectedMinSdkVersion: "Q",
- },
- {
- name: "current final SDK",
- sdkVersion: "current",
- platformSdkInt: 29,
- platformSdkCodename: "Q",
- platformSdkFinal: false,
deviceCurrentApiLevelForVendorModules: "28",
expectedMinSdkVersion: "28",
},