Merge changes Ib80f814f,Ic605e489 am: 3ef74f3cab

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626209

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I94fd187e5f2cc0428807668f82b3a29ad8b66c47
This commit is contained in:
Lucas Lin 2021-03-12 03:56:18 +00:00 • committed by Automerger Merge Worker
commit ca62593ba7
2 changed files with 18 additions and 0 deletions

View file

@ -7,6 +7,7 @@ package android.net {
public class ConnectivityManager {
method @NonNull @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public java.util.List<android.net.NetworkStateSnapshot> getAllNetworkStateSnapshot();
method @NonNull public static android.util.Range<java.lang.Integer> getIpSecNetIdRange();
method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void registerSystemDefaultNetworkCallback(@NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler);
method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void requestBackgroundNetwork(@NonNull android.net.NetworkRequest, @NonNull android.os.Handler, @NonNull android.net.ConnectivityManager.NetworkCallback);
method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_TEST_NETWORKS, android.Manifest.permission.NETWORK_STACK}) public void simulateDataStall(int, long, @NonNull android.net.Network, @NonNull android.os.PersistableBundle);

View file

@ -5053,4 +5053,21 @@ public class ConnectivityManager {
throw e.rethrowFromSystemServer();
}
}
// The first network ID of IPSec tunnel interface.
private static final int TUN_INTF_NETID_START = 0xFC00;
// The network ID range of IPSec tunnel interface.
private static final int TUN_INTF_NETID_RANGE = 0x0400;
/**
* Get the network ID range reserved for IPSec tunnel interfaces.
*
* @return A Range which indicates the network ID range of IPSec tunnel interface.
* @hide
*/
@SystemApi(client = MODULE_LIBRARIES)
@NonNull
public static Range<Integer> getIpSecNetIdRange() {
return new Range(TUN_INTF_NETID_START, TUN_INTF_NETID_START + TUN_INTF_NETID_RANGE - 1);
}
}