Remove unnecessary usages of core-all and restrict its visibility

The core-all library is not required for generating the
core-intra-stubs or for compiling them so this change removes the
reference to them from the build modules and also switches
core.intra.stubs from system_modules: "core-all-system-modules" to
system_modules: "none".

All other accesses to core-all is done via the core-all-system-modules
which means that core-all can use the package default visibility of
private. The core_all_visibility variable (along with its comment) was
inlined into the only module that references it.

Test: m checkbuild
Change-Id: I4703239567acf34354dae8b11b001d49b6672b66
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index 3dc4363..dc31d85 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -169,24 +169,11 @@
 // Build for the target (device).
 //
 
-// Visibility of core-all* build modules; we restrict visibility of core-all deliberately to
-// a small set of build modules that the core library team control. See core-all-system-modules
-// for more details.
-core_all_visibility = [
-    "//external/apache-harmony:__subpackages__",
-    "//external/apache-xml",
-    "//external/bouncycastle",
-    "//external/conscrypt",
-    "//external/icu/android_icu4j",
-    "//external/okhttp",
-    "//libcore:__subpackages__",
-]
-
 // A target used to bootstrap compilation for the core library.
+//
 // See core-all-system-modules for more details.
 java_library {
     name: "core-all",
-    visibility: core_all_visibility,
     defaults: ["libcore_java_defaults"],
 
     srcs: [
@@ -227,7 +214,19 @@
 // bouncycastle, etc.
 java_system_modules {
     name: "core-all-system-modules",
-    visibility: core_all_visibility,
+
+    // Visibility is deliberately restricted to a small set of build modules that
+    // the core library team control.
+    visibility: [
+        "//external/apache-harmony:__subpackages__",
+        "//external/apache-xml",
+        "//external/bouncycastle",
+        "//external/conscrypt",
+        "//external/icu/android_icu4j",
+        "//external/okhttp",
+        "//libcore:__subpackages__",
+    ],
+
     libs: ["core-all"],
 }