blob: af0f50ef181d76821e8b470ba29e34c70fab8c03 [file] [log] [blame]
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +09001// Signature format: 2.0
2package android.net {
3
4 public final class ConnectivityFrameworkInitializer {
5 method public static void registerServiceWrappers();
6 }
7
8 public class ConnectivityManager {
Chiachang Wangf9294e72021-03-18 09:44:34 +08009 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void factoryReset();
junyulaib1211372021-03-03 12:09:05 +080010 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();
Chiachang Wangf9294e72021-03-18 09:44:34 +080011 method @Nullable public android.net.ProxyInfo getGlobalProxy();
lucaslin5cdbcfb2021-03-12 00:46:33 +080012 method @NonNull public static android.util.Range<java.lang.Integer> getIpSecNetIdRange();
lucasline2cd02d2021-03-16 17:11:14 +080013 method @NonNull public static String getPrivateDnsMode(@NonNull android.content.Context);
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090014 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);
junyulaidbb70462021-03-09 20:49:48 +080015 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);
Chiachang Wangf9294e72021-03-18 09:44:34 +080016 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void setAcceptPartialConnectivity(@NonNull android.net.Network, boolean, boolean);
17 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void setAcceptUnvalidated(@NonNull android.net.Network, boolean, boolean);
18 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void setAvoidUnvalidated(@NonNull android.net.Network);
19 method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setGlobalProxy(@Nullable android.net.ProxyInfo);
Chalard Jean0a4aefc2021-03-03 16:37:13 +090020 method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setProfileNetworkPreference(@NonNull android.os.UserHandle, int, @Nullable java.util.concurrent.Executor, @Nullable Runnable);
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090021 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);
Remi NGUYEN VAN8238a762021-03-16 18:06:06 +090022 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void startCaptivePortalApp(@NonNull android.net.Network);
lucaslin10774b72021-03-17 14:16:01 +080023 method public void systemReady();
lucaslin889dcda2021-03-12 17:56:09 +080024 field public static final String PRIVATE_DNS_MODE_OFF = "off";
25 field public static final String PRIVATE_DNS_MODE_OPPORTUNISTIC = "opportunistic";
26 field public static final String PRIVATE_DNS_MODE_PROVIDER_HOSTNAME = "hostname";
Chalard Jeanbef6b092021-03-17 14:33:24 +090027 field public static final int PROFILE_NETWORK_PREFERENCE_DEFAULT = 0; // 0x0
28 field public static final int PROFILE_NETWORK_PREFERENCE_ENTERPRISE = 1; // 0x1
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090029 }
30
31 public final class NetworkAgentConfig implements android.os.Parcelable {
32 method @Nullable public String getSubscriberId();
33 }
34
35 public static final class NetworkAgentConfig.Builder {
36 method @NonNull public android.net.NetworkAgentConfig.Builder setSubscriberId(@Nullable String);
37 }
38
39 public final class NetworkCapabilities implements android.os.Parcelable {
Roshan Piuse2d28382021-02-23 08:47:39 -080040 ctor public NetworkCapabilities(@Nullable android.net.NetworkCapabilities, long);
Chiachang Wang628cb112021-03-19 00:45:39 +000041 method @Nullable public java.util.Set<android.util.Range<java.lang.Integer>> getUids();
junyulaib15b7db2021-03-16 10:24:43 +080042 method public boolean hasUnwantedCapability(int);
Roshan Piuse2d28382021-02-23 08:47:39 -080043 field public static final long REDACT_ALL = -1L; // 0xffffffffffffffffL
44 field public static final long REDACT_FOR_ACCESS_FINE_LOCATION = 1L; // 0x1L
45 field public static final long REDACT_FOR_LOCAL_MAC_ADDRESS = 2L; // 0x2L
46 field public static final long REDACT_FOR_NETWORK_SETTINGS = 4L; // 0x4L
47 field public static final long REDACT_NONE = 0L; // 0x0L
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090048 field public static final int TRANSPORT_TEST = 7; // 0x7
49 }
50
Chiachang Wang628cb112021-03-19 00:45:39 +000051 public static final class NetworkCapabilities.Builder {
52 method @NonNull public android.net.NetworkCapabilities.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>);
53 }
54
junyulaib15b7db2021-03-16 10:24:43 +080055 public class NetworkRequest implements android.os.Parcelable {
56 method public boolean hasUnwantedCapability(int);
57 }
58
Chiachang Wang628cb112021-03-19 00:45:39 +000059 public static class NetworkRequest.Builder {
junyulaib15b7db2021-03-16 10:24:43 +080060 method @NonNull public android.net.NetworkRequest.Builder addUnwantedCapability(int);
61 method @NonNull public android.net.NetworkRequest.Builder removeUnwantedCapability(int);
Chiachang Wang628cb112021-03-19 00:45:39 +000062 method @NonNull public android.net.NetworkRequest.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>);
63 }
64
Remi NGUYEN VAN25dcabf2021-03-15 10:20:40 +090065 public class ParseException extends java.lang.RuntimeException {
66 ctor public ParseException(@NonNull String);
67 ctor public ParseException(@NonNull String, @NonNull Throwable);
68 }
69
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090070 public final class TcpRepairWindow {
71 ctor public TcpRepairWindow(int, int, int, int, int, int);
72 field public final int maxWindow;
73 field public final int rcvWnd;
74 field public final int rcvWndScale;
75 field public final int rcvWup;
76 field public final int sndWl1;
77 field public final int sndWnd;
78 }
79
80 public final class TestNetworkInterface implements android.os.Parcelable {
81 ctor public TestNetworkInterface(@NonNull android.os.ParcelFileDescriptor, @NonNull String);
82 method public int describeContents();
83 method @NonNull public android.os.ParcelFileDescriptor getFileDescriptor();
84 method @NonNull public String getInterfaceName();
85 method public void writeToParcel(@NonNull android.os.Parcel, int);
86 field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkInterface> CREATOR;
87 }
88
89 public class TestNetworkManager {
90 method @NonNull public android.net.TestNetworkInterface createTapInterface();
91 method @NonNull public android.net.TestNetworkInterface createTunInterface(@NonNull java.util.Collection<android.net.LinkAddress>);
92 method public void setupTestNetwork(@NonNull String, @NonNull android.os.IBinder);
93 method public void teardownTestNetwork(@NonNull android.net.Network);
94 field public static final String TEST_TAP_PREFIX = "testtap";
95 }
96
Remi NGUYEN VANea33ac92021-02-04 14:20:19 +090097 public final class TestNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable {
98 ctor public TestNetworkSpecifier(@NonNull String);
99 method public int describeContents();
100 method @Nullable public String getInterfaceName();
101 method public void writeToParcel(@NonNull android.os.Parcel, int);
102 field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkSpecifier> CREATOR;
103 }
104
Roshan Piuse2d28382021-02-23 08:47:39 -0800105 public interface TransportInfo {
106 method public default long getApplicableRedactions();
107 method @NonNull public default android.net.TransportInfo makeCopy(long);
108 }
109
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900110 public final class VpnTransportInfo implements android.os.Parcelable android.net.TransportInfo {
111 ctor public VpnTransportInfo(int);
112 method public int describeContents();
113 method public void writeToParcel(@NonNull android.os.Parcel, int);
114 field @NonNull public static final android.os.Parcelable.Creator<android.net.VpnTransportInfo> CREATOR;
115 field public final int type;
116 }
117
118}
119