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