diff --git a/java/lint.go b/java/lint.go index a91278a90..30843dc93 100644 --- a/java/lint.go +++ b/java/lint.go @@ -347,7 +347,7 @@ func (l *linter) lint(ctx android.ModuleContext) { cmd := rule.Command() - cmd.Flag("JAVA_OPTS=-Xmx3072m"). + cmd.Flag(`JAVA_OPTS="-Xmx3072m --add-opens java.base/java.util=ALL-UNNAMED"`). FlagWithArg("ANDROID_SDK_HOME=", lintPaths.homeDir.String()). FlagWithInput("SDK_ANNOTATIONS=", annotationsZipPath). FlagWithInput("LINT_OPTS=-DLINT_API_DATABASE=", apiVersionsXMLPath) diff --git a/java/lint_defaults.txt b/java/lint_defaults.txt index 0786b7c00..2de05b0a0 100644 --- a/java/lint_defaults.txt +++ b/java/lint_defaults.txt @@ -76,3 +76,5 @@ # TODO(b/158390965): remove this when lint doesn't crash --disable_check HardcodedDebugMode + +--warning_check QueryAllPackagesPermission