Don't build hiddenapi flags or encode dex for unbundled builds

Builds with TARGET_BUILD_APPS shouldn't build the hiddenapi flags
or encode dex files even if frameworks/base exists.

Bug: 133343287
Test: mainline modules build
Change-Id: I0647451420fd09bb680808b35e1ad3b8f514ba46
Merged-In: I0647451420fd09bb680808b35e1ad3b8f514ba46
(cherry picked from commit 9c74a1ee85)
This commit is contained in:
Colin Cross
2019-05-28 14:06:17 -07:00
parent f2562eb417
commit 7b8a567f44
2 changed files with 6 additions and 4 deletions

View File

@@ -1270,9 +1270,11 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
return
}
// Hidden API CSV generation and dex encoding
dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile,
j.deviceProperties.UncompressDex)
if !ctx.Config().UnbundledBuild() {
// Hidden API CSV generation and dex encoding
dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile,
j.deviceProperties.UncompressDex)
}
// merge dex jar with resources if necessary
if j.resourceJar != nil {