Restore UNSAFE_DISABLE_HIDDENAPI_FLAGS functionality.
It got broken with the move to hiddenapi to Soong. Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true m -j32 Change-Id: Id369bfae8e118907b1f12faa7e4207494904edda
This commit is contained in:
@@ -78,11 +78,6 @@ var hiddenAPIEncodeDexRule = pctx.AndroidStaticRule("hiddenAPIEncodeDex", bluepr
|
|||||||
}, "flags", "tmpDir")
|
}, "flags", "tmpDir")
|
||||||
|
|
||||||
func hiddenAPIEncodeDex(ctx android.ModuleContext, output android.WritablePath, dexInput android.WritablePath) {
|
func hiddenAPIEncodeDex(ctx android.ModuleContext, output android.WritablePath, dexInput android.WritablePath) {
|
||||||
if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") {
|
|
||||||
output = dexInput
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
flags := &bootImagePath{ctx.Config().HiddenAPIFlags()}
|
flags := &bootImagePath{ctx.Config().HiddenAPIFlags()}
|
||||||
|
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
|
@@ -1180,6 +1180,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hidden API CSV generation and dex encoding
|
// Hidden API CSV generation and dex encoding
|
||||||
|
if !ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") {
|
||||||
isBootJar := inList(ctx.ModuleName(), ctx.Config().BootJars())
|
isBootJar := inList(ctx.ModuleName(), ctx.Config().BootJars())
|
||||||
if isBootJar || inList(ctx.ModuleName(), ctx.Config().HiddenAPIExtraAppUsageJars()) {
|
if isBootJar || inList(ctx.ModuleName(), ctx.Config().HiddenAPIExtraAppUsageJars()) {
|
||||||
// Derive the greylist from classes jar.
|
// Derive the greylist from classes jar.
|
||||||
@@ -1190,6 +1191,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
|
|||||||
hiddenAPIEncodeDex(ctx, hiddenAPIJar, dexOutputFile)
|
hiddenAPIEncodeDex(ctx, hiddenAPIJar, dexOutputFile)
|
||||||
dexOutputFile = hiddenAPIJar
|
dexOutputFile = hiddenAPIJar
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// merge dex jar with resources if necessary
|
// merge dex jar with resources if necessary
|
||||||
if j.resourceJar != nil {
|
if j.resourceJar != nil {
|
||||||
|
Reference in New Issue
Block a user