Add explicit dependency from core-oj to hiddenapi annotations

Previously, the dependency was implicit by name. This change makes it
explicit.

The core-oj-hiddenapi is renamed to prevent the implicit dependency
being discovered. A follow up change will remove that capability from
Soong.

Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
Change-Id: I731bb22cf21d837df6c7e00c58a1750199d03685
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index 2623a51..c4288f5 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -262,6 +262,9 @@
 
     notice: "ojluni/NOTICE",
 
+    hiddenapi_additional_annotations: [
+        "core-oj-hiddenapi-annotations",
+    ],
 }
 
 // Contains parts of core library not associated with OpenJDK. Contains not
@@ -322,13 +325,6 @@
 // Provided solely to contribute information about which hidden parts of the
 // core-oj API are used by apps.
 //
-// The build system determines that this library provides hiddenapi information
-// for the core-oj bootjar because its name is of the form <x>-hiddenapi, where
-// <x> is the name of a boot jar. That triggers the generation of a flags.csv
-// file which encapsulates information extracted from the UnsupportedAppUsage
-// annotations in the dex. The information from that file is then encoded into
-// the core-oj file.
-//
 // Usually, e.g. for core-libart, the UnsupportedAppUsage annotations are
 // added to the source that is compiled directly into the bootjar and the build
 // system extracts the information about UnsupportedAppUsage directly from
@@ -340,7 +336,7 @@
 // difficult to pull down changes from upstream.
 //
 java_library {
-    name: "core-oj-hiddenapi",
+    name: "core-oj-hiddenapi-annotations",
     // Do not allow this to be accessed from outside this directory.
     visibility: ["//visibility:private"],
     defaults: ["libcore_java_defaults"],