diff options
| author | 2019-02-07 07:27:33 +0000 | |
|---|---|---|
| committer | 2019-02-07 07:27:33 +0000 | |
| commit | 4c3a4aded31285fc2828a951377aaf7b05868dc9 (patch) | |
| tree | ca6ee78278d334112464b50b9527fad2cdfddd5c /java/java.go | |
| parent | 155d17c1da6da9cde02cd2850b4a85aba322684c (diff) | |
| parent | f24a22a98a3cc4cc5a5618e20f1962198d4ac5ab (diff) | |
Merge changes from topic "hiddenapi"
* changes:
Move hiddenapi singleton rules to Soong
Add MissingDeps to RuleBuilder
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/java/java.go b/java/java.go index d51420cdf..22829e407 100644 --- a/java/java.go +++ b/java/java.go @@ -313,6 +313,7 @@ type Module struct { // expanded Jarjar_rules expandJarjarRules android.Path + hiddenAPI dexpreopter } @@ -331,6 +332,7 @@ type Dependency interface { ImplementationJars() android.Paths ResourceJars() android.Paths ImplementationAndResourcesJars() android.Paths + DexJar() android.Path AidlIncludeDirs() android.Paths ExportedSdkLibs() []string } @@ -1216,18 +1218,8 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path } // Hidden API CSV generation and dex encoding - if !ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") { - isBootJar := inList(ctx.ModuleName(), ctx.Config().BootJars()) - if isBootJar || inList(ctx.ModuleName(), ctx.Config().HiddenAPIExtraAppUsageJars()) { - // Derive the greylist from classes jar. - hiddenAPIGenerateCSV(ctx, j.implementationJarFile) - } - if isBootJar { - hiddenAPIJar := android.PathForModuleOut(ctx, "hiddenapi", jarName) - hiddenAPIEncodeDex(ctx, hiddenAPIJar, dexOutputFile, j.deviceProperties.UncompressDex) - dexOutputFile = hiddenAPIJar - } - } + dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile, + j.deviceProperties.UncompressDex) // merge dex jar with resources if necessary if j.resourceJar != nil { @@ -1365,6 +1357,10 @@ func (j *Module) ImplementationJars() android.Paths { return android.Paths{j.implementationJarFile} } +func (j *Module) DexJar() android.Path { + return j.dexJarFile +} + func (j *Module) ResourceJars() android.Paths { if j.resourceJar == nil { return nil @@ -1775,6 +1771,10 @@ func (j *Import) ImplementationAndResourcesJars() android.Paths { return android.Paths{j.combinedClasspathFile} } +func (j *Import) DexJar() android.Path { + return nil +} + func (j *Import) AidlIncludeDirs() android.Paths { return nil } |