Create two sentinel api levels
This relands aosp/2470068. The original CL was submitted as part of a
stack that broke tm and udc. Those branches still contain soong modules
with min_sdk_version of type (kind+level).
Test: m nothing on tm and udc (via go/abtd)
Bug: 208456999
Change-Id: I8e013ec10530372f70f0ab0505b7eebeee2b360b
diff --git a/android/config.go b/android/config.go
index 292fcf2..593812c 100644
--- a/android/config.go
+++ b/android/config.go
@@ -52,6 +52,15 @@
// FutureApiLevelInt is a placeholder constant for unreleased API levels.
const FutureApiLevelInt = 10000
+// PrivateApiLevel represents the api level of SdkSpecPrivate (sdk_version: "")
+// This api_level exists to differentiate user-provided "" from "current" sdk_version
+// The differentiation is necessary to enable different validation rules for these two possible values.
+var PrivateApiLevel = ApiLevel{
+ value: "current", // The value is current since aidl expects `current` as the default (TestAidlFlagsWithMinSdkVersion)
+ number: FutureApiLevelInt + 1, // This is used to differentiate it from FutureApiLevel
+ isPreview: true,
+}
+
// FutureApiLevel represents unreleased API levels.
var FutureApiLevel = ApiLevel{
value: "current",