Allow codename.fingerprint format for targetSdkVersion
Use codename.fingerprint format for targetSdkVersion if it is unset
in the manifest and UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.
Test: manual
Bug: 130541924
Change-Id: I4e3b1274cc32038b00b292dc6d67559eb320e9e4
diff --git a/java/sdk_library.go b/java/sdk_library.go
index c60a8a0..72c5cfc 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -402,7 +402,7 @@
props.Sdk_version = proptools.StringPtr(module.sdkVersion(apiScope))
props.Libs = module.sdkLibraryProperties.Stub_only_libs
// Unbundled apps will use the prebult one from /prebuilts/sdk
- if mctx.Config().UnbundledBuildPrebuiltSdks() {
+ if mctx.Config().UnbundledBuildUsePrebuiltSdks() {
props.Product_variables.Unbundled_build.Enabled = proptools.BoolPtr(false)
}
props.Product_variables.Pdk.Enabled = proptools.BoolPtr(false)
@@ -612,7 +612,7 @@
// to satisfy SdkLibraryDependency interface
func (module *SdkLibrary) SdkHeaderJars(ctx android.BaseContext, sdkVersion string) android.Paths {
// This module is just a wrapper for the stubs.
- if ctx.Config().UnbundledBuildPrebuiltSdks() {
+ if ctx.Config().UnbundledBuildUsePrebuiltSdks() {
return module.PrebuiltJars(ctx, sdkVersion)
} else {
if strings.HasPrefix(sdkVersion, "system_") {
@@ -628,7 +628,7 @@
// to satisfy SdkLibraryDependency interface
func (module *SdkLibrary) SdkImplementationJars(ctx android.BaseContext, sdkVersion string) android.Paths {
// This module is just a wrapper for the stubs.
- if ctx.Config().UnbundledBuildPrebuiltSdks() {
+ if ctx.Config().UnbundledBuildUsePrebuiltSdks() {
return module.PrebuiltJars(ctx, sdkVersion)
} else {
if strings.HasPrefix(sdkVersion, "system_") {