Update max_sdk_version from SdkSpec to ApiLevel

max_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid max_sdk_version in bp
files

Bug: 208456999
Test: no change in ninja file (this should be a no-op)
Test: TH
Change-Id: I304b5ad802bde200137d8e225182828dfd6f7227
This commit is contained in:
Spandan Das
2023-03-02 00:56:06 +00:00
parent ca70fc40bd
commit a26eda7f2c
7 changed files with 28 additions and 23 deletions

View File

@@ -28,9 +28,9 @@ type SdkContext interface {
// MinSdkVersion returns ApiLevel that corresponds to the min_sdk_version property of the current module,
// or from sdk_version if it is not set.
MinSdkVersion(ctx EarlyModuleContext) ApiLevel
// ReplaceMaxSdkVersionPlaceholder returns SdkSpec to replace the maxSdkVersion property of permission and
// ReplaceMaxSdkVersionPlaceholder returns Apilevel to replace the maxSdkVersion property of permission and
// uses-permission tags if it is set.
ReplaceMaxSdkVersionPlaceholder(ctx EarlyModuleContext) SdkSpec
ReplaceMaxSdkVersionPlaceholder(ctx EarlyModuleContext) ApiLevel
// TargetSdkVersion returns the ApiLevel that corresponds to the target_sdk_version property of the current module,
// or from sdk_version if it is not set.
TargetSdkVersion(ctx EarlyModuleContext) ApiLevel