diff options
author | Jiyong Park <jiyong@google.com> | 2020-06-08 19:24:09 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2020-06-08 21:53:52 +0900 |
commit | 01bca755aed51ea681dbd2cf8237c7173f2cc30a (patch) | |
tree | 05a1271d56a6de525e515cd354c416d9068f2db8 /java/java.go | |
parent | 8a624337b308f70151a9f50f8ef29fd636f7e98c (diff) |
dex_import that isn't available for platform isn't installed
This change fixes a bug that dex_import module is always installed to
the platform even when the module is not available to the platform.
Exempt-From-Owner-Approval: cherry-pick from AOSP
Bug: 158284983
Test: OUT_DIR=/tmp/ndk build/soong/scripts/build-ndk-prebuilts.sh
Merged-In: I85570506e700be59ee63e4f1d7902a40e36df39c
(cherry picked from commit afd3d11a795b9f331637d3587a94142f20e8c55d)
Change-Id: I85570506e700be59ee63e4f1d7902a40e36df39c
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go index 0ba1f5a7a..ee4b8d89b 100644 --- a/java/java.go +++ b/java/java.go @@ -2753,8 +2753,10 @@ func (j *DexImport) GenerateAndroidBuildActions(ctx android.ModuleContext) { j.maybeStrippedDexJarFile = dexOutputFile - ctx.InstallFile(android.PathForModuleInstall(ctx, "framework"), - j.Stem()+".jar", dexOutputFile) + if j.IsForPlatform() { + ctx.InstallFile(android.PathForModuleInstall(ctx, "framework"), + j.Stem()+".jar", dexOutputFile) + } } func (j *DexImport) DexJarBuildPath() android.Path { |