Support nullability annotations in core platform APIs

Previously, adding nullability annotations to methods that were part of
either the legacy or stable core platform APIs would have no effect on
the generated stubs of the .txt files. This change rectifies that.

At the moment there are no methods in the core platform APIs that have
nullability annotations. Change https://r.android.com/1657840 will add
the first ones.

Bug: 183938110
Test: make update-api - after cherry picking https://r.android.com/165784
Change-Id: Idd9f4f38a995bc31a0f1a5702c1617d2de6ccc42
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index f58deeb..3c4fc93 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -755,6 +755,9 @@
 // available to metalava. Used for nullability annotations in OpenJDK source.
 droiddoc_exported_dir {
     name: "ojluni-annotated-sdk-stubs",
+    visibility: [
+        "//libcore:__subpackages__",
+    ],
     path: "ojluni/annotations/sdk",
 }