Build stub libraries with smaller deps

The stub libraries had a dependency to framework-internal-util which is
a collection of java static libraries whose source code is
auto-genmerated (e.g. via protoc, aidl, etc.)

The library was added as a dependency because some Java files that are
fed into the metalava for the stub code generation have references to
some of the auto-generated symbols. However, this is more than
necessary. Furthermore, that setup will create a circular dependency
when framework-internal-utils (or its transitive dependencies) have a
dependency to the stub libraries due to 'sdk_version' setting.

Fixing the problem by replacing the dependency to
framework-internal-util with a few number of libraries.

Bug: 169618843
Test: m
Change-Id: I30c953ed220e84ab295548845fff0b26e3c060b6
diff --git a/StubLibraries.bp b/StubLibraries.bp
index 4b0df44..79e2a87 100644
--- a/StubLibraries.bp
+++ b/StubLibraries.bp
@@ -55,7 +55,24 @@
     aidl: {
         local_include_dirs: ["telephony/java"],
     },
-    libs: ["framework-internal-utils"],
+    // These are libs from framework-internal-utils that are required (i.e. being referenced)
+    // from framework-non-updatable-sources. Add more here when there's a need.
+    // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular
+    // dependencies gets bigger.
+    libs: [
+        "android.hardware.cas-V1.2-java",
+        "android.hardware.health-V1.0-java-constants",
+        "android.hardware.radio-V1.5-java",
+        "android.hardware.thermal-V1.0-java-constants",
+        "android.hardware.thermal-V2.0-java",
+        "android.hardware.tv.input-V1.0-java-constants",
+        "android.hardware.tv.tuner-V1.0-java-constants",
+        "android.hardware.usb-V1.0-java-constants",
+        "android.hardware.usb-V1.1-java-constants",
+        "android.hardware.usb.gadget-V1.0-java",
+        "android.hardware.vibrator-V1.3-java",
+        "framework-protos",
+    ],
     installable: false,
     annotations_enabled: true,
     previous_api: ":android.api.public.latest",