summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pedro Loureiro <pedroql@google.com> 2022-06-17 22:05:39 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-06-17 22:05:39 +0000
commit424f1f103e52a70ffab8d2f86ebd876b7e90c841 (patch)
treef0c71ea96dc35cf5bdac56f392d76962d3288c1e
parent2e5c474bc854f54bb487b6edd6bd80bee8c12b25 (diff)
parent489912283e29c4ee07754b185e984eddd90fb067 (diff)
Translate SDK codenames to SDK versions for finalized releases am: 489912283e
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18965894 Change-Id: I98c4aba9b9e941945a7597034baa686f12d127a6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-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 cd8e8755e..47ffc6afc 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -2584,7 +2584,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