Add framework-connectivity-test-defaults

The defaults follow the same pattern as framework-wifi-test-defaults to
allow unit tests to build against hidden API in Connectivity.

(clean cherry-pick of history in downstream branch)

Bug: 171540887
Test: m
Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f
Change-Id: Ia8531f672820fcc8968f98494903e486c4e42652
diff --git a/framework/Android.bp b/framework/Android.bp
index 185e8a5..93ef3bf 100644
--- a/framework/Android.bp
+++ b/framework/Android.bp
@@ -118,7 +118,16 @@
         "//packages/modules/Connectivity/service",
         "//frameworks/base/packages/Connectivity/service",
         "//frameworks/base",
-        "//packages/modules/Connectivity/Tethering/tests/unit",
+
+        // Tests using hidden APIs
+        "//external/sl4a:__subpackages__",
+        "//frameworks/base/tests/net:__subpackages__",
+        "//frameworks/libs/net/common/testutils",
+        "//frameworks/libs/net/common/tests:__subpackages__",
+        "//frameworks/opt/telephony/tests/telephonytests",
+        "//packages/modules/Connectivity/Tethering/tests:__subpackages__",
+        "//packages/modules/Connectivity/tests:__subpackages__",
+        "//packages/modules/NetworkStack/tests:__subpackages__",
     ],
     apex_available: [
         "//apex_available:platform",