Copy @hide util files into framework-telephony.

Also add jarjar rules for them.

Bug: 140908357
Test: build
Change-Id: I4411be058a002a4339ea563f444de9f4c0b67f23
diff --git a/Android.bp b/Android.bp
index b3faef1..4113cff 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1126,9 +1126,10 @@
 }
 
 // Avoid including Parcelable classes as we don't want to have two copies of
-// Parcelable cross the process.
+// Parcelable cross the libraries. This is used by telephony-common (frameworks/opt/telephony)
+// and TeleService app (packages/services/Telephony).
 filegroup {
-    name: "framework-telephony-stack-shared-srcs",
+    name: "framework-telephony-common-shared-srcs",
     srcs: [
         "core/java/android/os/BasicShellCommandHandler.java",
         "core/java/android/os/RegistrantList.java",
@@ -1151,6 +1152,21 @@
 }
 
 // Avoid including Parcelable classes as we don't want to have two copies of
+// Parcelable cross the process. This is used by framework-telephony (frameworks/base/telephony).
+filegroup {
+    name: "framework-telephony-shared-srcs",
+    srcs: [
+        "core/java/android/util/RecurrenceRule.java",
+        "core/java/com/android/internal/os/SomeArgs.java",
+        "core/java/com/android/internal/util/BitwiseInputStream.java",
+        "core/java/com/android/internal/util/BitwiseOutputStream.java",
+        "core/java/com/android/internal/util/HexDump.java",
+        "core/java/com/android/internal/util/IndentingPrintWriter.java",
+        "core/java/com/android/internal/util/Preconditions.java",
+    ],
+}
+
+// Avoid including Parcelable classes as we don't want to have two copies of
 // Parcelable cross the process.
 filegroup {
     name: "framework-cellbroadcast-shared-srcs",
@@ -1272,6 +1288,7 @@
     name: "framework-telephony",
     srcs: [
         ":framework-telephony-sources",
+        ":framework-telephony-shared-srcs",
     ],
     // TODO: change to framework-system-stub to build against system APIs.
     libs: [
@@ -1290,7 +1307,7 @@
             "frameworks/native/aidl/gui",
         ]
     },
-    jarjar_rules: ":telephony-framework-jarjar-rules",
+    jarjar_rules: ":framework-telephony-jarjar-rules",
     dxflags: [
         "--core-library",
         "--multi-dex",
@@ -1309,6 +1326,6 @@
 }
 
 filegroup {
-    name: "telephony-framework-jarjar-rules",
+    name: "framework-telephony-jarjar-rules",
     srcs: ["telephony/framework-telephony-jarjar-rules.txt"],
 }