From 42308aa1741c559637de40e49c74f3ac12915f5e Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 14 Nov 2018 21:44:17 -0800 Subject: [PATCH] Fix resources in unbundled builds without sdk_version set Unbundled builds can be performed on modules that don't have sdk_version set if they are in a platform checkout that has framework-res. Don't skip calling decodeSdkDep in unbundled builds. Bug: 117295826 Test: tapas PackageInstaller && m Change-Id: I3de093cea05670e0b65e99820c07592973b90b3d --- java/aar.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/java/aar.go b/java/aar.go index a49aef0a2..99e9136d8 100644 --- a/java/aar.go +++ b/java/aar.go @@ -157,11 +157,9 @@ func (a *aapt) aapt2Flags(ctx android.ModuleContext, sdkContext sdkContext, mani } func (a *aapt) deps(ctx android.BottomUpMutatorContext, sdkContext sdkContext) { - if !ctx.Config().UnbundledBuild() { - sdkDep := decodeSdkDep(ctx, sdkContext) - if sdkDep.frameworkResModule != "" { - ctx.AddVariationDependencies(nil, frameworkResTag, sdkDep.frameworkResModule) - } + sdkDep := decodeSdkDep(ctx, sdkContext) + if sdkDep.frameworkResModule != "" { + ctx.AddVariationDependencies(nil, frameworkResTag, sdkDep.frameworkResModule) } }