diff options
| author | 2019-02-11 19:31:31 +0000 | |
|---|---|---|
| committer | 2019-02-11 19:31:31 +0000 | |
| commit | 8e41cdb267ae8e9b60bdebb5f05146990d2a17a6 (patch) | |
| tree | 6f3d0f7af666df193a4cffe22c798761ee8887f7 /java/java.go | |
| parent | 0dcfee56b8baaa59cf20ca991af787bcbd839f41 (diff) | |
| parent | 67e8ec1973700bbdbc4cd68b3493d56d270ca377 (diff) | |
Merge "Revert "Never strip and store dex files uncompressed when they are preopted on system.""
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 17 | 
1 files changed, 7 insertions, 10 deletions
| diff --git a/java/java.go b/java/java.go index 34e06d63a..3d7d6ad8d 100644 --- a/java/java.go +++ b/java/java.go @@ -1239,6 +1239,8 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path  		j.dexJarFile = dexOutputFile  		// Dexpreopting +		j.dexpreopter.isInstallable = Bool(j.properties.Installable) +		j.dexpreopter.uncompressedDex = j.deviceProperties.UncompressDex  		dexOutputFile = j.dexpreopt(ctx, dexOutputFile)  		j.maybeStrippedDexJarFile = dexOutputFile @@ -1415,13 +1417,10 @@ type Library struct {  }  func (j *Library) shouldUncompressDex(ctx android.ModuleContext) bool { -	// Store uncompressed (and do not strip) dex files from boot class path jars. -	if inList(ctx.ModuleName(), ctx.Config().BootJars()) { -		return true -	} - -	// Store uncompressed dex files that are preopted on /system. -	if !j.dexpreopter.dexpreoptDisabled(ctx) && (ctx.Host() || !odexOnSystemOther(ctx, j.dexpreopter.installPath)) { +	// Store uncompressed (and do not strip) dex files from boot class path jars that are +	// in an apex. +	if inList(ctx.ModuleName(), ctx.Config().BootJars()) && +		android.DirectlyInAnyApex(ctx, ctx.ModuleName()) {  		return true  	}  	if ctx.Config().UncompressPrivAppDex() && @@ -1435,9 +1434,7 @@ func (j *Library) shouldUncompressDex(ctx android.ModuleContext) bool {  func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {  	j.dexpreopter.installPath = android.PathForModuleInstall(ctx, "framework", ctx.ModuleName()+".jar")  	j.dexpreopter.isSDKLibrary = j.deviceProperties.IsSDKLibrary -	j.dexpreopter.isInstallable = Bool(j.properties.Installable) -	j.dexpreopter.uncompressedDex = j.shouldUncompressDex(ctx) -	j.deviceProperties.UncompressDex = j.dexpreopter.uncompressedDex +	j.deviceProperties.UncompressDex = j.shouldUncompressDex(ctx)  	j.compile(ctx)  	if (Bool(j.properties.Installable) || ctx.Host()) && !android.DirectlyInAnyApex(ctx, ctx.ModuleName()) { |