diff options
Diffstat (limited to 'java/hiddenapi.go')
-rw-r--r-- | java/hiddenapi.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/java/hiddenapi.go b/java/hiddenapi.go index 6020aba6..28724f2a 100644 --- a/java/hiddenapi.go +++ b/java/hiddenapi.go @@ -73,7 +73,14 @@ func (h *hiddenAPI) hiddenAPI(ctx android.ModuleContext, dexJar android.ModuleOu // to the hidden API for the bootclassloader. If information is gathered for modules // not on the list then that will cause failures in the CtsHiddenApiBlacklist... // tests. - if inList(bootJarName, ctx.Config().BootJars()) { + isBootJarProvider := false + ctx.VisitAllModuleVariants(func(module android.Module) { + if m, ok := module.(interface{ BootJarProvider() bool }); ok && + m.BootJarProvider() { + isBootJarProvider = true + } + }) + if isBootJarProvider && inList(bootJarName, ctx.Config().BootJars()) { // Derive the greylist from classes jar. flagsCSV := android.PathForModuleOut(ctx, "hiddenapi", "flags.csv") metadataCSV := android.PathForModuleOut(ctx, "hiddenapi", "metadata.csv") |