aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2018-05-09 11:11:35 -0700
committerColin Cross <ccross@android.com>2018-05-09 12:26:06 -0700
commitb691e24d899f3a773da88df0eecada5918a96a2c (patch)
tree8a32de60dddfd53f8dccf9fc2f32714e6e7c7ec3 /java
parent8fe13b971fe3ceff9e1fcbb9089e417dbeb17366 (diff)
downloadbuild_soong-b691e24d899f3a773da88df0eecada5918a96a2c.tar.gz
build_soong-b691e24d899f3a773da88df0eecada5918a96a2c.tar.bz2
build_soong-b691e24d899f3a773da88df0eecada5918a96a2c.zip
Pass platform version name as --version-name for framework-res.apk
framework-res.apk should get the platform version name ("9") as --version-name, not the SDK version ("28"). It will get copied to compileSdkVersionCodename in APKs compiled against it. Bug: 78324052 Test: aapt dump badging $OUT/system/framework/framework-res.apk | grep -i version Change-Id: I34a601cb2c14f66199066e7d598862108da0b950
Diffstat (limited to 'java')
-rw-r--r--java/aar.go4
1 files changed, 2 insertions, 2 deletions
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()
}