Suppress reflection warnings when running metalava

Intellij PSI/UAST reflects into java.base causing
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.util.ReflectionUtil (file:/mnt/ssd1/out/master/soong/host/linux-x86/framework/metalava.jar) to method java.util.ResourceBundle.setParent(java.util.ResourceBundle)
WARNING: Please consider reporting this to the maintainers of com.intellij.util.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Upstream bug https://youtrack.jetbrains.com/issue/IDEA-210683

Bug: 168689341
Test: make checkapi
Change-Id: Ibc8954d83d5962b3cd0ea1bac9a62f6ccfc88c6c
diff --git a/java/droiddoc.go b/java/droiddoc.go
index e39a556..85a61dd 100644
--- a/java/droiddoc.go
+++ b/java/droiddoc.go
@@ -1298,6 +1298,7 @@
 
 	cmd.BuiltTool(ctx, "metalava").
 		Flag(config.JavacVmFlags).
+		Flag("-J--add-opens=java.base/java.util=ALL-UNNAMED").
 		FlagWithArg("-encoding ", "UTF-8").
 		FlagWithArg("-source ", javaVersion.String()).
 		FlagWithRspFileInputList("@", srcs).