summaryrefslogtreecommitdiff
path: root/java/sdk_library.go
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2022-08-16 19:08:20 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-08-16 19:08:20 +0000
commit6ef4fae22995b4ad74b1607272bd221025ea367c (patch)
tree7b4d0c3be15b9a112cd4779ea0a9f8ece4ea118a /java/sdk_library.go
parentae7fe1697cee2638435522c6436e59d84661c699 (diff)
parent2822186571d46c970f00f720fd08c28830e62c8d (diff)
Merge "DO NOT MERGE - Merge Android 13"
Diffstat (limited to 'java/sdk_library.go')
-rw-r--r--java/sdk_library.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go
index f7e5d9d40..490c03132 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -2700,7 +2700,10 @@ func formattedOptionalSdkLevelAttribute(ctx android.ModuleContext, attrName stri
`"current" is not an allowed value for this attribute`)
return ""
}
- return formattedOptionalAttribute(attrName, value)
+ // "safeValue" is safe because it translates finalized codenames to a string
+ // with their SDK int.
+ safeValue := apiLevel.String()
+ return formattedOptionalAttribute(attrName, &safeValue)
}
// formats an attribute for the xml permissions file if the value is not null