diff options
author | Colin Cross <ccross@android.com> | 2018-12-21 12:59:54 -0800 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2019-01-09 08:31:48 +0000 |
commit | 2fc72f66d06ecaa08b35a206db7fd8f0f2de5c39 (patch) | |
tree | 305196740739ffafb6134831d782a8cd3715be3e /java/java.go | |
parent | 1f8076b42dfd99d01b720c027bafd7f671b1d12a (diff) |
Remove duplicated shouldUncompressDex logic
shouldUncompressDex has already been computed and stored in
deviceProperties.UncompressDex, pass it to dexpreopter instead
of recomputing it.
Also add a stub for java libraries to set UncompressDex.
Test: no change to build.ninja
Change-Id: I663d9fbbe768a8dc9a97c7d456dd7a010f43162d
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index 5e67193f0..8b8e4ba50 100644 --- a/java/java.go +++ b/java/java.go @@ -1327,6 +1327,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path j.dexJarFile = dexOutputFile j.dexpreopter.isInstallable = Bool(j.properties.Installable) + j.dexpreopter.uncompressedDex = j.deviceProperties.UncompressDex dexOutputFile = j.dexpreopt(ctx, dexOutputFile) j.maybeStrippedDexJarFile = dexOutputFile @@ -1499,9 +1500,14 @@ type Library struct { Module } +func (j *Library) shouldUncompressDex(ctx android.ModuleContext) bool { + return false +} + func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) { j.dexpreopter.installPath = android.PathForModuleInstall(ctx, "framework", ctx.ModuleName()+".jar") j.dexpreopter.isSDKLibrary = j.deviceProperties.IsSDKLibrary + j.deviceProperties.UncompressDex = j.shouldUncompressDex(ctx) j.compile(ctx) if Bool(j.properties.Installable) || ctx.Host() { |