Loading java/app.go +0 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,6 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) { installDir = filepath.Join("app", ctx.ModuleName()) } a.dexpreopter.installPath = android.PathForModuleInstall(ctx, installDir, ctx.ModuleName()+".apk") a.dexpreopter.isPrivApp = Bool(a.appProperties.Privileged) if ctx.ModuleName() != "framework-res" { a.Module.compile(ctx, a.aaptSrcJar) Loading java/dexpreopt.go +6 −12 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ type dexpreopter struct { dexpreoptProperties DexpreoptProperties installPath android.OutputPath isPrivApp bool uncompressedDex bool isSDKLibrary bool isTest bool isInstallable bool Loading Loading @@ -145,19 +145,13 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo deps = append(deps, profileClassListing.Path()) } uncompressedDex := false if ctx.Config().UncompressPrivAppDex() && (d.isPrivApp || inList(ctx.ModuleName(), ctx.Config().ModulesLoadedByPrivilegedModules())) { uncompressedDex = true } dexpreoptConfig := dexpreopt.ModuleConfig{ Name: ctx.ModuleName(), DexLocation: dexLocation, BuildPath: android.PathForModuleOut(ctx, "dexpreopt", ctx.ModuleName()+".jar").String(), DexPath: dexJarFile.String(), PreferCodeIntegrity: false, UncompressedDex: uncompressedDex, UncompressedDex: d.uncompressedDex, HasApkLibraries: false, PreoptFlags: nil, Loading java/java.go +6 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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() { Loading Loading
java/app.go +0 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,6 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) { installDir = filepath.Join("app", ctx.ModuleName()) } a.dexpreopter.installPath = android.PathForModuleInstall(ctx, installDir, ctx.ModuleName()+".apk") a.dexpreopter.isPrivApp = Bool(a.appProperties.Privileged) if ctx.ModuleName() != "framework-res" { a.Module.compile(ctx, a.aaptSrcJar) Loading
java/dexpreopt.go +6 −12 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ type dexpreopter struct { dexpreoptProperties DexpreoptProperties installPath android.OutputPath isPrivApp bool uncompressedDex bool isSDKLibrary bool isTest bool isInstallable bool Loading Loading @@ -145,19 +145,13 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo deps = append(deps, profileClassListing.Path()) } uncompressedDex := false if ctx.Config().UncompressPrivAppDex() && (d.isPrivApp || inList(ctx.ModuleName(), ctx.Config().ModulesLoadedByPrivilegedModules())) { uncompressedDex = true } dexpreoptConfig := dexpreopt.ModuleConfig{ Name: ctx.ModuleName(), DexLocation: dexLocation, BuildPath: android.PathForModuleOut(ctx, "dexpreopt", ctx.ModuleName()+".jar").String(), DexPath: dexJarFile.String(), PreferCodeIntegrity: false, UncompressedDex: uncompressedDex, UncompressedDex: d.uncompressedDex, HasApkLibraries: false, PreoptFlags: nil, Loading
java/java.go +6 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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() { Loading