diff options
| author | 2019-01-31 14:12:44 -0800 | |
|---|---|---|
| committer | 2019-02-06 11:23:40 -0800 | |
| commit | f24a22a98a3cc4cc5a5618e20f1962198d4ac5ab (patch) | |
| tree | ac4624f51e35d07d399d84882aeb59749cdf75f3 /java/java.go | |
| parent | 0d2f40ae6c5321ac8f15f01ec154f9378815a09f (diff) | |
Move hiddenapi singleton rules to Soong
Move the rules that build hiddenapi-stubs-flags.txt,
hiddenapi-flags.csv and hiddenapi-greylist.csv into Soong.
Bug: 123645297
Test: m checkbuild
Test: m UNSAFE_DISABLE_HIDDEN_API_FLAGS=true
Change-Id: I90bf58710f6153ee8565994f799d3ec5699bc7fa
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 } |