Loading packages/Connectivity/framework/api/module-lib-current.txt +4 −4 Original line number Diff line number Diff line Loading @@ -158,10 +158,10 @@ package android.net { } public class TestNetworkManager { method @NonNull public android.net.TestNetworkInterface createTapInterface(); method @NonNull public android.net.TestNetworkInterface createTunInterface(@NonNull java.util.Collection<android.net.LinkAddress>); method public void setupTestNetwork(@NonNull String, @NonNull android.os.IBinder); method public void teardownTestNetwork(@NonNull android.net.Network); method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public android.net.TestNetworkInterface createTapInterface(); method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public android.net.TestNetworkInterface createTunInterface(@NonNull java.util.Collection<android.net.LinkAddress>); method @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public void setupTestNetwork(@NonNull String, @NonNull android.os.IBinder); method @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public void teardownTestNetwork(@NonNull android.net.Network); field public static final String TEST_TAP_PREFIX = "testtap"; } Loading packages/Connectivity/framework/src/android/net/TestNetworkManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -15,8 +15,10 @@ */ package android.net; import android.Manifest; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.os.IBinder; import android.os.RemoteException; Loading Loading @@ -58,6 +60,7 @@ public class TestNetworkManager { * @param network The test network that should be torn down * @hide */ @RequiresPermission(Manifest.permission.MANAGE_TEST_NETWORKS) @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public void teardownTestNetwork(@NonNull Network network) { try { Loading Loading @@ -103,6 +106,7 @@ public class TestNetworkManager { * @param binder A binder object guarding the lifecycle of this test network. * @hide */ @RequiresPermission(Manifest.permission.MANAGE_TEST_NETWORKS) @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public void setupTestNetwork(@NonNull String iface, @NonNull IBinder binder) { setupTestNetwork(iface, null, true, new int[0], binder); Loading Loading @@ -145,6 +149,7 @@ public class TestNetworkManager { * TUN interface. * @hide */ @RequiresPermission(Manifest.permission.MANAGE_TEST_NETWORKS) @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @NonNull public TestNetworkInterface createTunInterface(@NonNull Collection<LinkAddress> linkAddrs) { Loading @@ -163,6 +168,7 @@ public class TestNetworkManager { * TAP interface. * @hide */ @RequiresPermission(Manifest.permission.MANAGE_TEST_NETWORKS) @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @NonNull public TestNetworkInterface createTapInterface() { Loading Loading
packages/Connectivity/framework/api/module-lib-current.txt +4 −4 Original line number Diff line number Diff line Loading @@ -158,10 +158,10 @@ package android.net { } public class TestNetworkManager { method @NonNull public android.net.TestNetworkInterface createTapInterface(); method @NonNull public android.net.TestNetworkInterface createTunInterface(@NonNull java.util.Collection<android.net.LinkAddress>); method public void setupTestNetwork(@NonNull String, @NonNull android.os.IBinder); method public void teardownTestNetwork(@NonNull android.net.Network); method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public android.net.TestNetworkInterface createTapInterface(); method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public android.net.TestNetworkInterface createTunInterface(@NonNull java.util.Collection<android.net.LinkAddress>); method @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public void setupTestNetwork(@NonNull String, @NonNull android.os.IBinder); method @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public void teardownTestNetwork(@NonNull android.net.Network); field public static final String TEST_TAP_PREFIX = "testtap"; } Loading
packages/Connectivity/framework/src/android/net/TestNetworkManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -15,8 +15,10 @@ */ package android.net; import android.Manifest; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.os.IBinder; import android.os.RemoteException; Loading Loading @@ -58,6 +60,7 @@ public class TestNetworkManager { * @param network The test network that should be torn down * @hide */ @RequiresPermission(Manifest.permission.MANAGE_TEST_NETWORKS) @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public void teardownTestNetwork(@NonNull Network network) { try { Loading Loading @@ -103,6 +106,7 @@ public class TestNetworkManager { * @param binder A binder object guarding the lifecycle of this test network. * @hide */ @RequiresPermission(Manifest.permission.MANAGE_TEST_NETWORKS) @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public void setupTestNetwork(@NonNull String iface, @NonNull IBinder binder) { setupTestNetwork(iface, null, true, new int[0], binder); Loading Loading @@ -145,6 +149,7 @@ public class TestNetworkManager { * TUN interface. * @hide */ @RequiresPermission(Manifest.permission.MANAGE_TEST_NETWORKS) @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @NonNull public TestNetworkInterface createTunInterface(@NonNull Collection<LinkAddress> linkAddrs) { Loading @@ -163,6 +168,7 @@ public class TestNetworkManager { * TAP interface. * @hide */ @RequiresPermission(Manifest.permission.MANAGE_TEST_NETWORKS) @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @NonNull public TestNetworkInterface createTapInterface() { Loading