summaryrefslogtreecommitdiff
path: root/java/rro.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2023-03-03 21:20:36 +0000
committer Spandan Das <spandandas@google.com> 2023-03-20 16:51:32 +0000
commite773739787394e9632043749e88ca6cfd5a40a67 (patch)
treec069277b81df80f608af7f97b33e62c3e0d18ff8 /java/rro.go
parent3015e38a5f0d466dd850fd0a77648844a1364efc (diff)
Update min_sdk_version from SdkSpec to ApiLevel
min_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 min_sdk_version in bp files Will do a similar cleanup for targetSdkVersion and maxSdkVersion in a followup CL Test: m nothing Test: no change in ninja files (this should be a no-op) Bug: 208456999 Change-Id: Ie6ae7e267d093c5e4787e82685daaca1021d202e
Diffstat (limited to 'java/rro.go')
-rw-r--r--java/rro.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/rro.go b/java/rro.go
index 9d0667cf0..49737b946 100644
--- a/java/rro.go
+++ b/java/rro.go
@@ -175,11 +175,11 @@ func (r *RuntimeResourceOverlay) SystemModules() string {
return ""
}
-func (r *RuntimeResourceOverlay) MinSdkVersion(ctx android.EarlyModuleContext) android.SdkSpec {
+func (r *RuntimeResourceOverlay) MinSdkVersion(ctx android.EarlyModuleContext) android.ApiLevel {
if r.properties.Min_sdk_version != nil {
- return android.SdkSpecFrom(ctx, *r.properties.Min_sdk_version)
+ return android.ApiLevelFrom(ctx, *r.properties.Min_sdk_version)
}
- return r.SdkVersion(ctx)
+ return r.SdkVersion(ctx).ApiLevel
}
func (r *RuntimeResourceOverlay) ReplaceMaxSdkVersionPlaceholder(ctx android.EarlyModuleContext) android.SdkSpec {