1// Signature format: 2.0
2package android.net {
3
4  public class CaptivePortal implements android.os.Parcelable {
5    method public int describeContents();
6    method public void ignoreNetwork();
7    method public void reportCaptivePortalDismissed();
8    method public void writeToParcel(android.os.Parcel, int);
9    field @NonNull public static final android.os.Parcelable.Creator<android.net.CaptivePortal> CREATOR;
10  }
11
12  public class ConnectivityDiagnosticsManager {
13    method public void registerConnectivityDiagnosticsCallback(@NonNull android.net.NetworkRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback);
14    method public void unregisterConnectivityDiagnosticsCallback(@NonNull android.net.ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback);
15  }
16
17  public abstract static class ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback {
18    ctor public ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback();
19    method public void onConnectivityReportAvailable(@NonNull android.net.ConnectivityDiagnosticsManager.ConnectivityReport);
20    method public void onDataStallSuspected(@NonNull android.net.ConnectivityDiagnosticsManager.DataStallReport);
21    method public void onNetworkConnectivityReported(@NonNull android.net.Network, boolean);
22  }
23
24  public static final class ConnectivityDiagnosticsManager.ConnectivityReport implements android.os.Parcelable {
25    ctor public ConnectivityDiagnosticsManager.ConnectivityReport(@NonNull android.net.Network, long, @NonNull android.net.LinkProperties, @NonNull android.net.NetworkCapabilities, @NonNull android.os.PersistableBundle);
26    method public int describeContents();
27    method @NonNull public android.os.PersistableBundle getAdditionalInfo();
28    method @NonNull public android.net.LinkProperties getLinkProperties();
29    method @NonNull public android.net.Network getNetwork();
30    method @NonNull public android.net.NetworkCapabilities getNetworkCapabilities();
31    method public long getReportTimestamp();
32    method public void writeToParcel(@NonNull android.os.Parcel, int);
33    field @NonNull public static final android.os.Parcelable.Creator<android.net.ConnectivityDiagnosticsManager.ConnectivityReport> CREATOR;
34    field public static final String KEY_NETWORK_PROBES_ATTEMPTED_BITMASK = "networkProbesAttempted";
35    field public static final String KEY_NETWORK_PROBES_SUCCEEDED_BITMASK = "networkProbesSucceeded";
36    field public static final String KEY_NETWORK_VALIDATION_RESULT = "networkValidationResult";
37    field public static final int NETWORK_PROBE_DNS = 4; // 0x4
38    field public static final int NETWORK_PROBE_FALLBACK = 32; // 0x20
39    field public static final int NETWORK_PROBE_HTTP = 8; // 0x8
40    field public static final int NETWORK_PROBE_HTTPS = 16; // 0x10
41    field public static final int NETWORK_PROBE_PRIVATE_DNS = 64; // 0x40
42    field public static final int NETWORK_VALIDATION_RESULT_INVALID = 0; // 0x0
43    field public static final int NETWORK_VALIDATION_RESULT_PARTIALLY_VALID = 2; // 0x2
44    field public static final int NETWORK_VALIDATION_RESULT_SKIPPED = 3; // 0x3
45    field public static final int NETWORK_VALIDATION_RESULT_VALID = 1; // 0x1
46  }
47
48  public static final class ConnectivityDiagnosticsManager.DataStallReport implements android.os.Parcelable {
49    ctor public ConnectivityDiagnosticsManager.DataStallReport(@NonNull android.net.Network, long, int, @NonNull android.net.LinkProperties, @NonNull android.net.NetworkCapabilities, @NonNull android.os.PersistableBundle);
50    method public int describeContents();
51    method public int getDetectionMethod();
52    method @NonNull public android.net.LinkProperties getLinkProperties();
53    method @NonNull public android.net.Network getNetwork();
54    method @NonNull public android.net.NetworkCapabilities getNetworkCapabilities();
55    method public long getReportTimestamp();
56    method @NonNull public android.os.PersistableBundle getStallDetails();
57    method public void writeToParcel(@NonNull android.os.Parcel, int);
58    field @NonNull public static final android.os.Parcelable.Creator<android.net.ConnectivityDiagnosticsManager.DataStallReport> CREATOR;
59    field public static final int DETECTION_METHOD_DNS_EVENTS = 1; // 0x1
60    field public static final int DETECTION_METHOD_TCP_METRICS = 2; // 0x2
61    field public static final String KEY_DNS_CONSECUTIVE_TIMEOUTS = "dnsConsecutiveTimeouts";
62    field public static final String KEY_TCP_METRICS_COLLECTION_PERIOD_MILLIS = "tcpMetricsCollectionPeriodMillis";
63    field public static final String KEY_TCP_PACKET_FAIL_RATE = "tcpPacketFailRate";
64  }
65
66  public class ConnectivityManager {
67    method public void addDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener);
68    method public boolean bindProcessToNetwork(@Nullable android.net.Network);
69    method @NonNull public android.net.SocketKeepalive createSocketKeepalive(@NonNull android.net.Network, @NonNull android.net.IpSecManager.UdpEncapsulationSocket, @NonNull java.net.InetAddress, @NonNull java.net.InetAddress, @NonNull java.util.concurrent.Executor, @NonNull android.net.SocketKeepalive.Callback);
70    method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.Network getActiveNetwork();
71    method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.NetworkInfo getActiveNetworkInfo();
72    method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.NetworkInfo[] getAllNetworkInfo();
73    method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.Network[] getAllNetworks();
74    method @Deprecated public boolean getBackgroundDataSetting();
75    method @Nullable public android.net.Network getBoundNetworkForProcess();
76    method public int getConnectionOwnerUid(int, @NonNull java.net.InetSocketAddress, @NonNull java.net.InetSocketAddress);
77    method @Nullable public android.net.ProxyInfo getDefaultProxy();
78    method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.LinkProperties getLinkProperties(@Nullable android.net.Network);
79    method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public int getMultipathPreference(@Nullable android.net.Network);
80    method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.NetworkCapabilities getNetworkCapabilities(@Nullable android.net.Network);
81    method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.NetworkInfo getNetworkInfo(int);
82    method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.NetworkInfo getNetworkInfo(@Nullable android.net.Network);
83    method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public int getNetworkPreference();
84    method @Nullable public byte[] getNetworkWatchlistConfigHash();
85    method @Deprecated @Nullable public static android.net.Network getProcessDefaultNetwork();
86    method public int getRestrictBackgroundStatus();
87    method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public boolean isActiveNetworkMetered();
88    method public boolean isDefaultNetworkActive();
89    method @Deprecated public static boolean isNetworkTypeValid(int);
90    method public void registerBestMatchingNetworkCallback(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler);
91    method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void registerDefaultNetworkCallback(@NonNull android.net.ConnectivityManager.NetworkCallback);
92    method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void registerDefaultNetworkCallback(@NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler);
93    method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void registerNetworkCallback(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback);
94    method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void registerNetworkCallback(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler);
95    method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void registerNetworkCallback(@NonNull android.net.NetworkRequest, @NonNull android.app.PendingIntent);
96    method public void releaseNetworkRequest(@NonNull android.app.PendingIntent);
97    method public void removeDefaultNetworkActiveListener(@NonNull android.net.ConnectivityManager.OnNetworkActiveListener);
98    method @Deprecated public void reportBadNetwork(@Nullable android.net.Network);
99    method public void reportNetworkConnectivity(@Nullable android.net.Network, boolean);
100    method public boolean requestBandwidthUpdate(@NonNull android.net.Network);
101    method public void requestNetwork(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback);
102    method public void requestNetwork(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler);
103    method public void requestNetwork(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback, int);
104    method public void requestNetwork(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler, int);
105    method public void requestNetwork(@NonNull android.net.NetworkRequest, @NonNull android.app.PendingIntent);
106    method @Deprecated public void setNetworkPreference(int);
107    method @Deprecated public static boolean setProcessDefaultNetwork(@Nullable android.net.Network);
108    method public void unregisterNetworkCallback(@NonNull android.net.ConnectivityManager.NetworkCallback);
109    method public void unregisterNetworkCallback(@NonNull android.app.PendingIntent);
110    field @Deprecated public static final String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
111    field public static final String ACTION_CAPTIVE_PORTAL_SIGN_IN = "android.net.conn.CAPTIVE_PORTAL";
112    field public static final String ACTION_RESTRICT_BACKGROUND_CHANGED = "android.net.conn.RESTRICT_BACKGROUND_CHANGED";
113    field @Deprecated public static final String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
114    field @Deprecated public static final int DEFAULT_NETWORK_PREFERENCE = 1; // 0x1
115    field public static final String EXTRA_CAPTIVE_PORTAL = "android.net.extra.CAPTIVE_PORTAL";
116    field public static final String EXTRA_CAPTIVE_PORTAL_URL = "android.net.extra.CAPTIVE_PORTAL_URL";
117    field @Deprecated public static final String EXTRA_EXTRA_INFO = "extraInfo";
118    field @Deprecated public static final String EXTRA_IS_FAILOVER = "isFailover";
119    field public static final String EXTRA_NETWORK = "android.net.extra.NETWORK";
120    field @Deprecated public static final String EXTRA_NETWORK_INFO = "networkInfo";
121    field public static final String EXTRA_NETWORK_REQUEST = "android.net.extra.NETWORK_REQUEST";
122    field @Deprecated public static final String EXTRA_NETWORK_TYPE = "networkType";
123    field public static final String EXTRA_NO_CONNECTIVITY = "noConnectivity";
124    field @Deprecated public static final String EXTRA_OTHER_NETWORK_INFO = "otherNetwork";
125    field public static final String EXTRA_REASON = "reason";
126    field public static final int MULTIPATH_PREFERENCE_HANDOVER = 1; // 0x1
127    field public static final int MULTIPATH_PREFERENCE_PERFORMANCE = 4; // 0x4
128    field public static final int MULTIPATH_PREFERENCE_RELIABILITY = 2; // 0x2
129    field public static final int RESTRICT_BACKGROUND_STATUS_DISABLED = 1; // 0x1
130    field public static final int RESTRICT_BACKGROUND_STATUS_ENABLED = 3; // 0x3
131    field public static final int RESTRICT_BACKGROUND_STATUS_WHITELISTED = 2; // 0x2
132    field @Deprecated public static final int TYPE_BLUETOOTH = 7; // 0x7
133    field @Deprecated public static final int TYPE_DUMMY = 8; // 0x8
134    field @Deprecated public static final int TYPE_ETHERNET = 9; // 0x9
135    field @Deprecated public static final int TYPE_MOBILE = 0; // 0x0
136    field @Deprecated public static final int TYPE_MOBILE_DUN = 4; // 0x4
137    field @Deprecated public static final int TYPE_MOBILE_HIPRI = 5; // 0x5
138    field @Deprecated public static final int TYPE_MOBILE_MMS = 2; // 0x2
139    field @Deprecated public static final int TYPE_MOBILE_SUPL = 3; // 0x3
140    field @Deprecated public static final int TYPE_VPN = 17; // 0x11
141    field @Deprecated public static final int TYPE_WIFI = 1; // 0x1
142    field @Deprecated public static final int TYPE_WIMAX = 6; // 0x6
143  }
144
145  public static class ConnectivityManager.NetworkCallback {
146    ctor public ConnectivityManager.NetworkCallback();
147    ctor public ConnectivityManager.NetworkCallback(int);
148    method public void onAvailable(@NonNull android.net.Network);
149    method public void onBlockedStatusChanged(@NonNull android.net.Network, boolean);
150    method public void onCapabilitiesChanged(@NonNull android.net.Network, @NonNull android.net.NetworkCapabilities);
151    method public void onLinkPropertiesChanged(@NonNull android.net.Network, @NonNull android.net.LinkProperties);
152    method public void onLosing(@NonNull android.net.Network, int);
153    method public void onLost(@NonNull android.net.Network);
154    method public void onUnavailable();
155    field public static final int FLAG_INCLUDE_LOCATION_INFO = 1; // 0x1
156  }
157
158  public static interface ConnectivityManager.OnNetworkActiveListener {
159    method public void onNetworkActive();
160  }
161
162  public class DhcpInfo implements android.os.Parcelable {
163    ctor public DhcpInfo();
164    method public int describeContents();
165    method public void writeToParcel(android.os.Parcel, int);
166    field @NonNull public static final android.os.Parcelable.Creator<android.net.DhcpInfo> CREATOR;
167    field public int dns1;
168    field public int dns2;
169    field public int gateway;
170    field public int ipAddress;
171    field public int leaseDuration;
172    field public int netmask;
173    field public int serverAddress;
174  }
175
176  public final class DnsResolver {
177    method @NonNull public static android.net.DnsResolver getInstance();
178    method public void query(@Nullable android.net.Network, @NonNull String, int, @NonNull java.util.concurrent.Executor, @Nullable android.os.CancellationSignal, @NonNull android.net.DnsResolver.Callback<? super java.util.List<java.net.InetAddress>>);
179    method public void query(@Nullable android.net.Network, @NonNull String, int, int, @NonNull java.util.concurrent.Executor, @Nullable android.os.CancellationSignal, @NonNull android.net.DnsResolver.Callback<? super java.util.List<java.net.InetAddress>>);
180    method public void rawQuery(@Nullable android.net.Network, @NonNull byte[], int, @NonNull java.util.concurrent.Executor, @Nullable android.os.CancellationSignal, @NonNull android.net.DnsResolver.Callback<? super byte[]>);
181    method public void rawQuery(@Nullable android.net.Network, @NonNull String, int, int, int, @NonNull java.util.concurrent.Executor, @Nullable android.os.CancellationSignal, @NonNull android.net.DnsResolver.Callback<? super byte[]>);
182    field public static final int CLASS_IN = 1; // 0x1
183    field public static final int ERROR_PARSE = 0; // 0x0
184    field public static final int ERROR_SYSTEM = 1; // 0x1
185    field public static final int FLAG_EMPTY = 0; // 0x0
186    field public static final int FLAG_NO_CACHE_LOOKUP = 4; // 0x4
187    field public static final int FLAG_NO_CACHE_STORE = 2; // 0x2
188    field public static final int FLAG_NO_RETRY = 1; // 0x1
189    field public static final int TYPE_A = 1; // 0x1
190    field public static final int TYPE_AAAA = 28; // 0x1c
191  }
192
193  public static interface DnsResolver.Callback<T> {
194    method public void onAnswer(@NonNull T, int);
195    method public void onError(@NonNull android.net.DnsResolver.DnsException);
196  }
197
198  public static class DnsResolver.DnsException extends java.lang.Exception {
199    field public final int code;
200  }
201
202  public class InetAddresses {
203    method public static boolean isNumericAddress(@NonNull String);
204    method @NonNull public static java.net.InetAddress parseNumericAddress(@NonNull String);
205  }
206
207  public final class IpPrefix implements android.os.Parcelable {
208    method public boolean contains(@NonNull java.net.InetAddress);
209    method public int describeContents();
210    method @NonNull public java.net.InetAddress getAddress();
211    method @IntRange(from=0, to=128) public int getPrefixLength();
212    method @NonNull public byte[] getRawAddress();
213    method public void writeToParcel(android.os.Parcel, int);
214    field @NonNull public static final android.os.Parcelable.Creator<android.net.IpPrefix> CREATOR;
215  }
216
217  public class LinkAddress implements android.os.Parcelable {
218    method public int describeContents();
219    method public java.net.InetAddress getAddress();
220    method public int getFlags();
221    method @IntRange(from=0, to=128) public int getPrefixLength();
222    method public int getScope();
223    method public void writeToParcel(android.os.Parcel, int);
224    field @NonNull public static final android.os.Parcelable.Creator<android.net.LinkAddress> CREATOR;
225  }
226
227  public final class LinkProperties implements android.os.Parcelable {
228    ctor public LinkProperties();
229    method public boolean addRoute(@NonNull android.net.RouteInfo);
230    method public void clear();
231    method public int describeContents();
232    method @Nullable public java.net.Inet4Address getDhcpServerAddress();
233    method @NonNull public java.util.List<java.net.InetAddress> getDnsServers();
234    method @Nullable public String getDomains();
235    method @Nullable public android.net.ProxyInfo getHttpProxy();
236    method @Nullable public String getInterfaceName();
237    method @NonNull public java.util.List<android.net.LinkAddress> getLinkAddresses();
238    method public int getMtu();
239    method @Nullable public android.net.IpPrefix getNat64Prefix();
240    method @Nullable public String getPrivateDnsServerName();
241    method @NonNull public java.util.List<android.net.RouteInfo> getRoutes();
242    method public boolean isPrivateDnsActive();
243    method public boolean isWakeOnLanSupported();
244    method public void setDhcpServerAddress(@Nullable java.net.Inet4Address);
245    method public void setDnsServers(@NonNull java.util.Collection<java.net.InetAddress>);
246    method public void setDomains(@Nullable String);
247    method public void setHttpProxy(@Nullable android.net.ProxyInfo);
248    method public void setInterfaceName(@Nullable String);
249    method public void setLinkAddresses(@NonNull java.util.Collection<android.net.LinkAddress>);
250    method public void setMtu(int);
251    method public void setNat64Prefix(@Nullable android.net.IpPrefix);
252    method public void writeToParcel(android.os.Parcel, int);
253    field @NonNull public static final android.os.Parcelable.Creator<android.net.LinkProperties> CREATOR;
254  }
255
256  public final class MacAddress implements android.os.Parcelable {
257    method public int describeContents();
258    method @NonNull public static android.net.MacAddress fromBytes(@NonNull byte[]);
259    method @NonNull public static android.net.MacAddress fromString(@NonNull String);
260    method public int getAddressType();
261    method @Nullable public java.net.Inet6Address getLinkLocalIpv6FromEui48Mac();
262    method public boolean isLocallyAssigned();
263    method public boolean matches(@NonNull android.net.MacAddress, @NonNull android.net.MacAddress);
264    method @NonNull public byte[] toByteArray();
265    method @NonNull public String toOuiString();
266    method public void writeToParcel(android.os.Parcel, int);
267    field public static final android.net.MacAddress BROADCAST_ADDRESS;
268    field @NonNull public static final android.os.Parcelable.Creator<android.net.MacAddress> CREATOR;
269    field public static final int TYPE_BROADCAST = 3; // 0x3
270    field public static final int TYPE_MULTICAST = 2; // 0x2
271    field public static final int TYPE_UNICAST = 1; // 0x1
272  }
273
274  public class Network implements android.os.Parcelable {
275    method public void bindSocket(java.net.DatagramSocket) throws java.io.IOException;
276    method public void bindSocket(java.net.Socket) throws java.io.IOException;
277    method public void bindSocket(java.io.FileDescriptor) throws java.io.IOException;
278    method public int describeContents();
279    method public static android.net.Network fromNetworkHandle(long);
280    method public java.net.InetAddress[] getAllByName(String) throws java.net.UnknownHostException;
281    method public java.net.InetAddress getByName(String) throws java.net.UnknownHostException;
282    method public long getNetworkHandle();
283    method public javax.net.SocketFactory getSocketFactory();
284    method public java.net.URLConnection openConnection(java.net.URL) throws java.io.IOException;
285    method public java.net.URLConnection openConnection(java.net.URL, java.net.Proxy) throws java.io.IOException;
286    method public void writeToParcel(android.os.Parcel, int);
287    field @NonNull public static final android.os.Parcelable.Creator<android.net.Network> CREATOR;
288  }
289
290  public final class NetworkCapabilities implements android.os.Parcelable {
291    ctor public NetworkCapabilities();
292    ctor public NetworkCapabilities(android.net.NetworkCapabilities);
293    method public int describeContents();
294    method @NonNull public int[] getCapabilities();
295    method public int getLinkDownstreamBandwidthKbps();
296    method public int getLinkUpstreamBandwidthKbps();
297    method @Nullable public android.net.NetworkSpecifier getNetworkSpecifier();
298    method public int getOwnerUid();
299    method public int getSignalStrength();
300    method @Nullable public android.net.TransportInfo getTransportInfo();
301    method public boolean hasCapability(int);
302    method public boolean hasTransport(int);
303    method public void writeToParcel(android.os.Parcel, int);
304    field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkCapabilities> CREATOR;
305    field public static final int NET_CAPABILITY_CAPTIVE_PORTAL = 17; // 0x11
306    field public static final int NET_CAPABILITY_CBS = 5; // 0x5
307    field public static final int NET_CAPABILITY_DUN = 2; // 0x2
308    field public static final int NET_CAPABILITY_EIMS = 10; // 0xa
309    field public static final int NET_CAPABILITY_ENTERPRISE = 29; // 0x1d
310    field public static final int NET_CAPABILITY_FOREGROUND = 19; // 0x13
311    field public static final int NET_CAPABILITY_FOTA = 3; // 0x3
312    field public static final int NET_CAPABILITY_HEAD_UNIT = 32; // 0x20
313    field public static final int NET_CAPABILITY_IA = 7; // 0x7
314    field public static final int NET_CAPABILITY_IMS = 4; // 0x4
315    field public static final int NET_CAPABILITY_INTERNET = 12; // 0xc
316    field public static final int NET_CAPABILITY_MCX = 23; // 0x17
317    field public static final int NET_CAPABILITY_MMS = 0; // 0x0
318    field public static final int NET_CAPABILITY_NOT_CONGESTED = 20; // 0x14
319    field public static final int NET_CAPABILITY_NOT_METERED = 11; // 0xb
320    field public static final int NET_CAPABILITY_NOT_RESTRICTED = 13; // 0xd
321    field public static final int NET_CAPABILITY_NOT_ROAMING = 18; // 0x12
322    field public static final int NET_CAPABILITY_NOT_SUSPENDED = 21; // 0x15
323    field public static final int NET_CAPABILITY_NOT_VPN = 15; // 0xf
324    field public static final int NET_CAPABILITY_RCS = 8; // 0x8
325    field public static final int NET_CAPABILITY_SUPL = 1; // 0x1
326    field public static final int NET_CAPABILITY_TEMPORARILY_NOT_METERED = 25; // 0x19
327    field public static final int NET_CAPABILITY_TRUSTED = 14; // 0xe
328    field public static final int NET_CAPABILITY_VALIDATED = 16; // 0x10
329    field public static final int NET_CAPABILITY_WIFI_P2P = 6; // 0x6
330    field public static final int NET_CAPABILITY_XCAP = 9; // 0x9
331    field public static final int SIGNAL_STRENGTH_UNSPECIFIED = -2147483648; // 0x80000000
332    field public static final int TRANSPORT_BLUETOOTH = 2; // 0x2
333    field public static final int TRANSPORT_CELLULAR = 0; // 0x0
334    field public static final int TRANSPORT_ETHERNET = 3; // 0x3
335    field public static final int TRANSPORT_LOWPAN = 6; // 0x6
336    field public static final int TRANSPORT_USB = 8; // 0x8
337    field public static final int TRANSPORT_VPN = 4; // 0x4
338    field public static final int TRANSPORT_WIFI = 1; // 0x1
339    field public static final int TRANSPORT_WIFI_AWARE = 5; // 0x5
340  }
341
342  @Deprecated public class NetworkInfo implements android.os.Parcelable {
343    ctor @Deprecated public NetworkInfo(int, int, @Nullable String, @Nullable String);
344    method @Deprecated public int describeContents();
345    method @Deprecated @NonNull public android.net.NetworkInfo.DetailedState getDetailedState();
346    method @Deprecated public String getExtraInfo();
347    method @Deprecated public String getReason();
348    method @Deprecated public android.net.NetworkInfo.State getState();
349    method @Deprecated public int getSubtype();
350    method @Deprecated public String getSubtypeName();
351    method @Deprecated public int getType();
352    method @Deprecated public String getTypeName();
353    method @Deprecated public boolean isAvailable();
354    method @Deprecated public boolean isConnected();
355    method @Deprecated public boolean isConnectedOrConnecting();
356    method @Deprecated public boolean isFailover();
357    method @Deprecated public boolean isRoaming();
358    method @Deprecated public void setDetailedState(@NonNull android.net.NetworkInfo.DetailedState, @Nullable String, @Nullable String);
359    method @Deprecated public void writeToParcel(android.os.Parcel, int);
360    field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkInfo> CREATOR;
361  }
362
363  @Deprecated public enum NetworkInfo.DetailedState {
364    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState AUTHENTICATING;
365    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState BLOCKED;
366    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState CAPTIVE_PORTAL_CHECK;
367    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState CONNECTED;
368    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState CONNECTING;
369    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState DISCONNECTED;
370    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState DISCONNECTING;
371    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState FAILED;
372    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState IDLE;
373    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState OBTAINING_IPADDR;
374    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState SCANNING;
375    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState SUSPENDED;
376    enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState VERIFYING_POOR_LINK;
377  }
378
379  @Deprecated public enum NetworkInfo.State {
380    enum_constant @Deprecated public static final android.net.NetworkInfo.State CONNECTED;
381    enum_constant @Deprecated public static final android.net.NetworkInfo.State CONNECTING;
382    enum_constant @Deprecated public static final android.net.NetworkInfo.State DISCONNECTED;
383    enum_constant @Deprecated public static final android.net.NetworkInfo.State DISCONNECTING;
384    enum_constant @Deprecated public static final android.net.NetworkInfo.State SUSPENDED;
385    enum_constant @Deprecated public static final android.net.NetworkInfo.State UNKNOWN;
386  }
387
388  public class NetworkRequest implements android.os.Parcelable {
389    method public boolean canBeSatisfiedBy(@Nullable android.net.NetworkCapabilities);
390    method public int describeContents();
391    method @NonNull public int[] getCapabilities();
392    method @Nullable public android.net.NetworkSpecifier getNetworkSpecifier();
393    method @NonNull public int[] getTransportTypes();
394    method public boolean hasCapability(int);
395    method public boolean hasTransport(int);
396    method public void writeToParcel(android.os.Parcel, int);
397    field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkRequest> CREATOR;
398  }
399
400  public static class NetworkRequest.Builder {
401    ctor public NetworkRequest.Builder();
402    ctor public NetworkRequest.Builder(@NonNull android.net.NetworkRequest);
403    method public android.net.NetworkRequest.Builder addCapability(int);
404    method public android.net.NetworkRequest.Builder addTransportType(int);
405    method public android.net.NetworkRequest build();
406    method @NonNull public android.net.NetworkRequest.Builder clearCapabilities();
407    method public android.net.NetworkRequest.Builder removeCapability(int);
408    method public android.net.NetworkRequest.Builder removeTransportType(int);
409    method @NonNull public android.net.NetworkRequest.Builder setIncludeOtherUidNetworks(boolean);
410    method @Deprecated public android.net.NetworkRequest.Builder setNetworkSpecifier(String);
411    method public android.net.NetworkRequest.Builder setNetworkSpecifier(android.net.NetworkSpecifier);
412  }
413
414  public class ParseException extends java.lang.RuntimeException {
415    ctor public ParseException(@NonNull String);
416    ctor public ParseException(@NonNull String, @NonNull Throwable);
417    field public String response;
418  }
419
420  public class ProxyInfo implements android.os.Parcelable {
421    ctor public ProxyInfo(@Nullable android.net.ProxyInfo);
422    method public static android.net.ProxyInfo buildDirectProxy(String, int);
423    method public static android.net.ProxyInfo buildDirectProxy(String, int, java.util.List<java.lang.String>);
424    method public static android.net.ProxyInfo buildPacProxy(android.net.Uri);
425    method @NonNull public static android.net.ProxyInfo buildPacProxy(@NonNull android.net.Uri, int);
426    method public int describeContents();
427    method public String[] getExclusionList();
428    method public String getHost();
429    method public android.net.Uri getPacFileUrl();
430    method public int getPort();
431    method public boolean isValid();
432    method public void writeToParcel(android.os.Parcel, int);
433    field @NonNull public static final android.os.Parcelable.Creator<android.net.ProxyInfo> CREATOR;
434  }
435
436  public final class RouteInfo implements android.os.Parcelable {
437    method public int describeContents();
438    method @NonNull public android.net.IpPrefix getDestination();
439    method @Nullable public java.net.InetAddress getGateway();
440    method @Nullable public String getInterface();
441    method public boolean hasGateway();
442    method public boolean isDefaultRoute();
443    method public boolean matches(java.net.InetAddress);
444    method public void writeToParcel(android.os.Parcel, int);
445    field @NonNull public static final android.os.Parcelable.Creator<android.net.RouteInfo> CREATOR;
446  }
447
448  public abstract class SocketKeepalive implements java.lang.AutoCloseable {
449    method public final void close();
450    method public final void start(@IntRange(from=0xa, to=0xe10) int);
451    method public final void stop();
452    field public static final int ERROR_HARDWARE_ERROR = -31; // 0xffffffe1
453    field public static final int ERROR_INSUFFICIENT_RESOURCES = -32; // 0xffffffe0
454    field public static final int ERROR_INVALID_INTERVAL = -24; // 0xffffffe8
455    field public static final int ERROR_INVALID_IP_ADDRESS = -21; // 0xffffffeb
456    field public static final int ERROR_INVALID_LENGTH = -23; // 0xffffffe9
457    field public static final int ERROR_INVALID_NETWORK = -20; // 0xffffffec
458    field public static final int ERROR_INVALID_PORT = -22; // 0xffffffea
459    field public static final int ERROR_INVALID_SOCKET = -25; // 0xffffffe7
460    field public static final int ERROR_SOCKET_NOT_IDLE = -26; // 0xffffffe6
461    field public static final int ERROR_UNSUPPORTED = -30; // 0xffffffe2
462  }
463
464  public static class SocketKeepalive.Callback {
465    ctor public SocketKeepalive.Callback();
466    method public void onDataReceived();
467    method public void onError(int);
468    method public void onStarted();
469    method public void onStopped();
470  }
471
472  public interface TransportInfo {
473  }
474
475}
476
477