Generate merged public and system stubs

Eliminate another two enumerations of all modules.

Bug: 169103987
Test: m android_{,system_}stubs_current && diff intermediates (no diffs)
Change-Id: I0d35f1e76320356ee4e5535a40614cf7d8ff4486
diff --git a/StubLibraries.bp b/StubLibraries.bp
index bf92b4c..a0a426e 100644
--- a/StubLibraries.bp
+++ b/StubLibraries.bp
@@ -215,54 +215,6 @@
 // from stub sources
 /////////////////////////////////////////////////////////////////////
 
-modules_public_stubs = [
-    "android.net.ipsec.ike.stubs",
-    "art.module.public.api.stubs",
-    "conscrypt.module.public.api.stubs",
-    "framework-appsearch.stubs",
-    "framework-bluetooth.stubs",
-    "framework-connectivity.stubs",
-    "framework-connectivity-tiramisu.stubs",
-    "framework-graphics.stubs",
-    "framework-media.stubs",
-    "framework-mediaprovider.stubs",
-    "framework-nearby.stubs",
-    "framework-permission.stubs",
-    "framework-permission-s.stubs",
-    "framework-scheduling.stubs",
-    "framework-sdkextensions.stubs",
-    "framework-statsd.stubs",
-    "framework-supplementalprocess.stubs",
-    "framework-tethering.stubs",
-    "framework-uwb.stubs",
-    "framework-wifi.stubs",
-    "i18n.module.public.api.stubs",
-]
-
-modules_system_stubs = [
-    "android.net.ipsec.ike.stubs.system",
-    "art.module.public.api.stubs.system",
-    "conscrypt.module.public.api.stubs", // Only has public stubs
-    "framework-appsearch.stubs.system",
-    "framework-bluetooth.stubs.system",
-    "framework-connectivity.stubs.system",
-    "framework-connectivity-tiramisu.stubs.system",
-    "framework-graphics.stubs.system",
-    "framework-media.stubs.system",
-    "framework-mediaprovider.stubs.system",
-    "framework-nearby.stubs.system",
-    "framework-permission.stubs.system",
-    "framework-permission-s.stubs.system",
-    "framework-scheduling.stubs.system",
-    "framework-sdkextensions.stubs.system",
-    "framework-statsd.stubs.system",
-    "framework-supplementalprocess.stubs",
-    "framework-tethering.stubs.system",
-    "framework-uwb.stubs.system",
-    "framework-wifi.stubs.system",
-    "i18n.module.public.api.stubs", // Only has public stubs
-]
-
 java_defaults {
     name: "android-non-updatable_defaults_stubs_current",
     libs: ["stub-annotations"],
@@ -284,14 +236,7 @@
     name: "android-non-updatable.stubs",
     defaults: ["android-non-updatable_defaults_stubs_current"],
     srcs: [":api-stubs-docs-non-updatable"],
-    libs: modules_public_stubs,
-    soong_config_variables: {
-        include_nonpublic_framework_api: {
-            libs: [
-                "framework-supplementalapi.stubs",
-            ],
-        },
-    },
+    libs: ["all-modules-public-stubs"],
     dist: {
         dir: "apistubs/android/public",
     },
@@ -301,14 +246,7 @@
     name: "android-non-updatable.stubs.system",
     defaults: ["android-non-updatable_defaults_stubs_current"],
     srcs: [":system-api-stubs-docs-non-updatable"],
-    libs: modules_system_stubs,
-    soong_config_variables: {
-        include_nonpublic_framework_api: {
-            libs: [
-                "framework-supplementalapi.stubs",
-            ],
-        },
-    },
+    libs: ["all-modules-system-stubs"],
     dist: {
         dir: "apistubs/android/system",
     },
@@ -335,14 +273,7 @@
     name: "android-non-updatable.stubs.test",
     defaults: ["android-non-updatable_defaults_stubs_current"],
     srcs: [":test-api-stubs-docs-non-updatable"],
-    libs: modules_system_stubs,
-    soong_config_variables: {
-        include_nonpublic_framework_api: {
-            libs: [
-                "framework-supplementalapi.stubs",
-            ],
-        },
-    },
+    libs: ["all-modules-system-stubs"],
     dist: {
         dir: "apistubs/android/test",
     },
@@ -360,33 +291,21 @@
 
 java_library_with_nonpublic_deps {
     name: "android_stubs_current",
-    static_libs: modules_public_stubs + [
+    static_libs: [
+        "all-modules-public-stubs",
         "android-non-updatable.stubs",
         "private-stub-annotations-jar",
     ],
-    soong_config_variables: {
-        include_nonpublic_framework_api: {
-            static_libs: [
-                "framework-supplementalapi.stubs",
-            ],
-        },
-    },
     defaults: ["android.jar_defaults"],
 }
 
 java_library_with_nonpublic_deps {
     name: "android_system_stubs_current",
-    static_libs: modules_system_stubs + [
+    static_libs: [
+        "all-modules-system-stubs",
         "android-non-updatable.stubs.system",
         "private-stub-annotations-jar",
     ],
-    soong_config_variables: {
-        include_nonpublic_framework_api: {
-            static_libs: [
-                "framework-supplementalapi.stubs",
-            ],
-        },
-    },
     defaults: [
         "android.jar_defaults",
         "android_stubs_dists_default",
@@ -408,17 +327,11 @@
     name: "android_test_stubs_current",
     // Modules do not have test APIs, but we want to include their SystemApis, like we include
     // the SystemApi of framework-non-updatable-sources.
-    static_libs: modules_system_stubs + [
+    static_libs: [
+        "all-modules-system-stubs",
         "android-non-updatable.stubs.test",
         "private-stub-annotations-jar",
     ],
-    soong_config_variables: {
-        include_nonpublic_framework_api: {
-            static_libs: [
-                "framework-supplementalapi.stubs",
-            ],
-        },
-    },
     defaults: [
         "android.jar_defaults",
         "android_stubs_dists_default",