Add dependency on system API in connectivity

The system API are moved to the connectivity module: add dependency on
the stubs from framework-tethering.

This only allows tethering to depend on system API defined by the
connectivity classes, not on any private code, even if they are
eventually bundled in the same APEX.

Bug: 171540887
Test: m
Ignore-AOSP-First: Merge conflicts, will cherry-pick

Change-Id: Iebfb3e01c5d2480e84edcfc76cf489520bd60237
diff --git a/Tethering/Android.bp b/Tethering/Android.bp
index 742fd02..320ba8f 100644
--- a/Tethering/Android.bp
+++ b/Tethering/Android.bp
@@ -41,6 +41,7 @@
         "netd-client",
     ],
     libs: [
+        "framework-connectivity",
         "framework-statsd.stubs.module_lib",
         "framework-tethering.impl",
         "framework-wifi",
diff --git a/Tethering/common/TetheringLib/Android.bp b/Tethering/common/TetheringLib/Android.bp
index 2631d08..b141eae 100644
--- a/Tethering/common/TetheringLib/Android.bp
+++ b/Tethering/common/TetheringLib/Android.bp
@@ -26,6 +26,13 @@
     ],
 
     srcs: [":framework-tethering-srcs"],
+    libs: ["framework-connectivity"],
+    stub_only_libs: ["framework-connectivity"],
+    aidl: {
+        include_dirs: [
+            "frameworks/base/packages/Connectivity/framework/aidl-export",
+        ],
+    },
 
     jarjar_rules: "jarjar-rules.txt",
     installable: true,