Run NetworkStaticLibTests on the actual source files. am: 7dfa03e4e6 am: 7b4ac77f88 am: 1619722fe5

Change-Id: I843052cbc53baeaedc7e5249cf6d3b3edfa701ea
diff --git a/staticlibs/Android.bp b/staticlibs/Android.bp
index c3b8668..8f845bc 100644
--- a/staticlibs/Android.bp
+++ b/staticlibs/Android.bp
@@ -45,6 +45,7 @@
         "//frameworks/opt/telephony",
         "//packages/modules/NetworkStack",
         "//packages/modules/CaptivePortalLogin",
+        "//frameworks/libs/net/common/tests:__subpackages__",
     ]
 }
 
@@ -61,6 +62,7 @@
         "//frameworks/opt/net/ike",
         "//packages/modules/NetworkStack",
         "//packages/modules/CaptivePortalLogin",
+        "//frameworks/libs/net/common/tests:__subpackages__",
     ],
 }
 
diff --git a/staticlibs/tests/unit/Android.bp b/staticlibs/tests/unit/Android.bp
index 4a51a8c..fe363f5 100644
--- a/staticlibs/tests/unit/Android.bp
+++ b/staticlibs/tests/unit/Android.bp
@@ -6,9 +6,12 @@
     name: "NetworkStaticLibTests",
     certificate: "platform",
     srcs: ["src/**/*.java","src/**/*.kt"],
+    jarjar_rules: "jarjar-rules.txt",
     test_suites: ["device-tests"],
     static_libs: [
         "androidx.test.rules",
+        "net-utils-framework-common",
+        "net-utils-services-common",
     ],
     libs: [
         "android.test.runner",
diff --git a/staticlibs/tests/unit/jarjar-rules.txt b/staticlibs/tests/unit/jarjar-rules.txt
new file mode 100644
index 0000000..dbb3974
--- /dev/null
+++ b/staticlibs/tests/unit/jarjar-rules.txt
@@ -0,0 +1,4 @@
+# Ensure that the tests can directly use the version of classes from the library. Otherwise, they
+# will use whatever version is currently in the bootclasspath on the device running the test.
+# These rules must match the jarjar rules used to build the library.
+rule android.net.util.** com.android.net.module.util.@1