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
This commit is contained in:
Spandan Das
2023-03-02 23:36:39 +00:00
parent ef5b7e4e36
commit 15da5887fe
4 changed files with 47 additions and 5 deletions

View File

@@ -52,6 +52,15 @@ var StringDefault = proptools.StringDefault
// 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",