Add connectivity protos to framework-connectivity am: f96b26606a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635040

Change-Id: Idebb84324407d0ce2f0066888b14fc22df736515
diff --git a/framework/Android.bp b/framework/Android.bp
index 86433e1..017ff51 100644
--- a/framework/Android.bp
+++ b/framework/Android.bp
@@ -23,6 +23,25 @@
     default_applicable_licenses: ["frameworks_base_license"],
 }
 
+java_library {
+    name: "framework-connectivity-protos",
+    proto: {
+        type: "nano",
+    },
+    srcs: [
+        // TODO: consider moving relevant .proto files directly to the module directory
+        ":framework-javastream-protos",
+    ],
+    apex_available: [
+        "//apex_available:platform",
+        "com.android.tethering",
+    ],
+    jarjar_rules: "jarjar-rules-proto.txt",
+    visibility: [
+        "//visibility:private",
+    ],
+}
+
 filegroup {
     name: "framework-connectivity-internal-sources",
     srcs: [
@@ -111,6 +130,7 @@
         "ServiceConnectivityResources",
     ],
     static_libs: [
+        "framework-connectivity-protos",
         "net-utils-device-common",
     ],
     jarjar_rules: "jarjar-rules.txt",
diff --git a/framework/jarjar-rules-proto.txt b/framework/jarjar-rules-proto.txt
new file mode 100644
index 0000000..37b4dec
--- /dev/null
+++ b/framework/jarjar-rules-proto.txt
@@ -0,0 +1,3 @@
+keep android.net.NetworkCapabilitiesProto
+keep android.net.NetworkProto
+keep android.net.NetworkRequestProto
diff --git a/framework/jarjar-rules.txt b/framework/jarjar-rules.txt
index 381a4ac..0959840 100644
--- a/framework/jarjar-rules.txt
+++ b/framework/jarjar-rules.txt
@@ -5,3 +5,6 @@
 zap com.android.net.module.annotation.**
 zap com.android.internal.annotations.**
 
+rule android.net.NetworkCapabilitiesProto* android.net.connectivity.proto.NetworkCapabilitiesProto@1
+rule android.net.NetworkProto* android.net.connectivity.proto.NetworkProto@1
+rule android.net.NetworkRequestProto* android.net.connectivity.proto.NetworkRequestProto@1