Translate SDK codenames to SDK versions for finalized releases am: 489912283e am: 5a92f17f03

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18965894

Change-Id: I65a8a512d626e70fdfa8b6cbdcd398752df1af47
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Pedro Loureiro
2022-06-17 22:27:48 +00:00
committed by Automerger Merge Worker

View File

@@ -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