Create two sentinel api levels

InvalidApiLevel:
This will be used for error handling if a user provided api level is
not recognized

PrivateApiLevel:
This will be used to differentiate the api level of sdk_version:"" from
sdk_version:"current" or sdk_version:"<active_codename>" (all used to be
FutureApiLevel previously). This was not necessary previously since the
type of min_sdk_version was SdkSpec(kind+level). Since it had access to
kind, it could check that it was not SdkSpecPrivate

Test: m nothing
Change-Id: I628b443c34bf2ec258d947dfec09f38b126bc6bb
This commit is contained in:
Spandan Das
2023-03-02 23:36:39 +00:00
parent 895bc9463b
commit 7ee04614cd
4 changed files with 47 additions and 5 deletions

View File

@@ -37,11 +37,11 @@ func TestSdkSpecFrom(t *testing.T) {
},
{
input: "_",
expected: "invalid_(no version)",
expected: "invalid__",
},
{
input: "_31",
expected: "invalid_(no version)",
expected: "invalid__31",
},
{
input: "system_R",