Rename tethering jni and get the jni by its package name
tetherutiljni is renamed to com_android_networkstack_tethering_jni_util
Bug: 205088391
Test: atest TetheringTests
atest CtsTetheringTest
atest TetheringPrivilegedTests
Change-Id: Ifd1f4473625e33d3ebe190c9f8a2b5d54aa1ff49
diff --git a/Tethering/tests/integration/Android.bp b/Tethering/tests/integration/Android.bp
index 7e8c65b..a2bd1a5 100644
--- a/Tethering/tests/integration/Android.bp
+++ b/Tethering/tests/integration/Android.bp
@@ -142,7 +142,7 @@
"libstaticjvmtiagent",
// For NetworkStackUtils included in NetworkStackBase
"libnetworkstackutilsjni",
- "libtetherutilsjni",
+ "libcom_android_networkstack_tethering_util_jni",
],
compile_multilib: "both",
manifest: "AndroidManifest_coverage.xml",
diff --git a/Tethering/tests/privileged/Android.bp b/Tethering/tests/privileged/Android.bp
index 8e29ed3..214b014 100644
--- a/Tethering/tests/privileged/Android.bp
+++ b/Tethering/tests/privileged/Android.bp
@@ -23,7 +23,7 @@
jni_libs: [
"libdexmakerjvmtiagent",
"libstaticjvmtiagent",
- "libtetherutilsjni",
+ "libcom_android_networkstack_tethering_util_jni",
],
jni_uses_sdk_apis: true,
jarjar_rules: ":TetheringTestsJarJarRules",
diff --git a/Tethering/tests/privileged/src/android/net/ip/DadProxyTest.java b/Tethering/tests/privileged/src/android/net/ip/DadProxyTest.java
index 59974bf..eb9cf71 100644
--- a/Tethering/tests/privileged/src/android/net/ip/DadProxyTest.java
+++ b/Tethering/tests/privileged/src/android/net/ip/DadProxyTest.java
@@ -20,6 +20,7 @@
import static com.android.net.module.util.IpUtils.icmpv6Checksum;
import static com.android.net.module.util.NetworkStackConstants.ETHER_SRC_ADDR_OFFSET;
+import static com.android.networkstack.tethering.util.TetheringUtils.getTetheringJniLibraryName;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -80,7 +81,7 @@
@BeforeClass
public static void setupOnce() {
- System.loadLibrary("tetherutilsjni");
+ System.loadLibrary(getTetheringJniLibraryName());
final Instrumentation inst = InstrumentationRegistry.getInstrumentation();
final IBinder netdIBinder =
diff --git a/Tethering/tests/privileged/src/com/android/networkstack/tethering/BpfMapTest.java b/Tethering/tests/privileged/src/com/android/networkstack/tethering/BpfMapTest.java
index 184d045..646c75f 100644
--- a/Tethering/tests/privileged/src/com/android/networkstack/tethering/BpfMapTest.java
+++ b/Tethering/tests/privileged/src/com/android/networkstack/tethering/BpfMapTest.java
@@ -18,6 +18,8 @@
import static android.system.OsConstants.ETH_P_IPV6;
+import static com.android.networkstack.tethering.util.TetheringUtils.getTetheringJniLibraryName;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -59,7 +61,7 @@
@BeforeClass
public static void setupOnce() {
- System.loadLibrary("tetherutilsjni");
+ System.loadLibrary(getTetheringJniLibraryName());
}
@Before
diff --git a/Tethering/tests/unit/Android.bp b/Tethering/tests/unit/Android.bp
index 85169f9..228f3fd 100644
--- a/Tethering/tests/unit/Android.bp
+++ b/Tethering/tests/unit/Android.bp
@@ -75,7 +75,7 @@
// For mockito extended
"libdexmakerjvmtiagent",
"libstaticjvmtiagent",
- "libtetherutilsjni",
+ "libcom_android_networkstack_tethering_util_jni",
],
}