Pass platform version name as --version-name for framework-res.apk

am: b691e24d89

Change-Id: I3fad46dcbc4f61aa5dbb66b4cc4a8eac1cd70e94
This commit is contained in:
Colin Cross
2018-05-09 14:40:27 -07:00
committed by android-build-merger
3 changed files with 7 additions and 2 deletions

View File

@@ -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()
}