Remove the return value from dexpreopt

dexpreopt doesn't strip dex files from the input jar anymore, so there's
no point returning the input jar path untouched.

Test: m nothing + TreeHugger
Change-Id: I8fde6cdc19e85a2fbc946513696417b945c5de0f
This commit is contained in:
Jaewoong Jung
2020-12-17 09:43:28 -08:00
parent 1a74be780b
commit 4b97a56615
3 changed files with 10 additions and 12 deletions

View File

@@ -1546,11 +1546,11 @@ func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext
a.dexpreopter.enforceUsesLibs = a.usesLibrary.enforceUsesLibraries()
a.dexpreopter.classLoaderContexts = a.usesLibrary.classLoaderContextForUsesLibDeps(ctx)
dexOutput := a.dexpreopter.dexpreopt(ctx, jnisUncompressed)
a.dexpreopter.dexpreopt(ctx, jnisUncompressed)
if a.dexpreopter.uncompressedDex {
dexUncompressed := android.PathForModuleOut(ctx, "dex-uncompressed", ctx.ModuleName()+".apk")
a.uncompressDex(ctx, dexOutput, dexUncompressed.OutputPath)
dexOutput = dexUncompressed
a.uncompressDex(ctx, jnisUncompressed, dexUncompressed.OutputPath)
jnisUncompressed = dexUncompressed
}
apkFilename := proptools.StringDefault(a.properties.Filename, a.BaseModuleName()+".apk")
@@ -1574,11 +1574,11 @@ func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext
if lineage := String(a.properties.Lineage); lineage != "" {
lineageFile = android.PathForModuleSrc(ctx, lineage)
}
SignAppPackage(ctx, signed, dexOutput, certificates, nil, lineageFile)
SignAppPackage(ctx, signed, jnisUncompressed, certificates, nil, lineageFile)
a.outputFile = signed
} else {
alignedApk := android.PathForModuleOut(ctx, "zip-aligned", apkFilename)
TransformZipAlign(ctx, alignedApk, dexOutput)
TransformZipAlign(ctx, alignedApk, jnisUncompressed)
a.outputFile = alignedApk
a.certificate = PresignedCertificate
}