aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-05-10 07:22:26 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-05-10 07:22:26 +0000
commit358647b5ec1114ac16ac76b7c533245ded00d433 (patch)
tree8a32de60dddfd53f8dccf9fc2f32714e6e7c7ec3
parent081cb096b7fc2e25a6e809b4767fb888e1748dae (diff)
parentb691e24d899f3a773da88df0eecada5918a96a2c (diff)
downloadbuild_soong-358647b5ec1114ac16ac76b7c533245ded00d433.tar.gz
build_soong-358647b5ec1114ac16ac76b7c533245ded00d433.tar.bz2
build_soong-358647b5ec1114ac16ac76b7c533245ded00d433.zip
Snap for 4773106 from b691e24d899f3a773da88df0eecada5918a96a2c to pi-release
Change-Id: I508cd5fa3e117ca9d90e5c0ac604b7e416855758
-rw-r--r--android/config.go4
-rw-r--r--android/variable.go1
-rw-r--r--java/aar.go4
3 files changed, 7 insertions, 2 deletions
diff --git a/android/config.go b/android/config.go
index 549abe91..fafed6b0 100644
--- a/android/config.go
+++ b/android/config.go
@@ -468,6 +468,10 @@ func (c *config) ResourceOverlays() []string {
return *c.productVariables.ResourceOverlays
}
+func (c *config) PlatformVersionName() string {
+ return String(c.productVariables.Platform_version_name)
+}
+
func (c *config) PlatformSdkVersionInt() int {
return *c.productVariables.Platform_sdk_version
}
diff --git a/android/variable.go b/android/variable.go
index 9d9830ea..f4aaec7a 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -127,6 +127,7 @@ type productVariables struct {
BuildNumberFromFile *string `json:",omitempty"`
DateFromFile *string `json:",omitempty"`
+ Platform_version_name *string `json:",omitempty"`
Platform_sdk_version *int `json:",omitempty"`
Platform_sdk_codename *string `json:",omitempty"`
Platform_sdk_final *bool `json:",omitempty"`
diff --git a/java/aar.go b/java/aar.go
index 9e5cddb6..66f1cab6 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -150,8 +150,8 @@ func (a *aapt) aapt2Flags(ctx android.ModuleContext, sdkVersion string) (flags [
if ctx.ModuleName() == "framework-res" {
// Some builds set AppsDefaultVersionName() to include the build number ("O-123456"). aapt2 copies the
// version name of framework-res into app manifests as compileSdkVersionCodename, which confuses things
- // if it contains the build number. Use the DefaultAppTargetSdk instead.
- versionName = ctx.Config().DefaultAppTargetSdk()
+ // if it contains the build number. Use the PlatformVersionName instead.
+ versionName = ctx.Config().PlatformVersionName()
} else {
versionName = ctx.Config().AppsDefaultVersionName()
}