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 @Deprecated @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 public void registerBestMatchingNetworkCallback(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler); 91*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void registerDefaultNetworkCallback(@NonNull android.net.ConnectivityManager.NetworkCallback); 92*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void registerDefaultNetworkCallback(@NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler); 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); 94*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); 95*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void registerNetworkCallback(@NonNull android.net.NetworkRequest, @NonNull android.app.PendingIntent); 96*344a7f5eSAndroid Build Coastguard Worker method public void releaseNetworkRequest(@NonNull android.app.PendingIntent); 97*344a7f5eSAndroid Build Coastguard Worker method public void removeDefaultNetworkActiveListener(@NonNull android.net.ConnectivityManager.OnNetworkActiveListener); 98*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void reportBadNetwork(@Nullable android.net.Network); 99*344a7f5eSAndroid Build Coastguard Worker method public void reportNetworkConnectivity(@Nullable android.net.Network, boolean); 100*344a7f5eSAndroid Build Coastguard Worker method public boolean requestBandwidthUpdate(@NonNull android.net.Network); 101*344a7f5eSAndroid Build Coastguard Worker method public void requestNetwork(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback); 102*344a7f5eSAndroid Build Coastguard Worker method public void requestNetwork(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler); 103*344a7f5eSAndroid Build Coastguard Worker method public void requestNetwork(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback, int); 104*344a7f5eSAndroid Build Coastguard Worker method public void requestNetwork(@NonNull android.net.NetworkRequest, @NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler, int); 105*344a7f5eSAndroid Build Coastguard Worker method public void requestNetwork(@NonNull android.net.NetworkRequest, @NonNull android.app.PendingIntent); 106*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void setNetworkPreference(int); 107*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public static boolean setProcessDefaultNetwork(@Nullable android.net.Network); 108*344a7f5eSAndroid Build Coastguard Worker method public void unregisterNetworkCallback(@NonNull android.net.ConnectivityManager.NetworkCallback); 109*344a7f5eSAndroid Build Coastguard Worker method public void unregisterNetworkCallback(@NonNull android.app.PendingIntent); 110*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED"; 111*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_CAPTIVE_PORTAL_SIGN_IN = "android.net.conn.CAPTIVE_PORTAL"; 112*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_RESTRICT_BACKGROUND_CHANGED = "android.net.conn.RESTRICT_BACKGROUND_CHANGED"; 113*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE"; 114*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int DEFAULT_NETWORK_PREFERENCE = 1; // 0x1 115*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_CAPTIVE_PORTAL = "android.net.extra.CAPTIVE_PORTAL"; 116*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_CAPTIVE_PORTAL_URL = "android.net.extra.CAPTIVE_PORTAL_URL"; 117*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final String EXTRA_EXTRA_INFO = "extraInfo"; 118*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final String EXTRA_IS_FAILOVER = "isFailover"; 119*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_NETWORK = "android.net.extra.NETWORK"; 120*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final String EXTRA_NETWORK_INFO = "networkInfo"; 121*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_NETWORK_REQUEST = "android.net.extra.NETWORK_REQUEST"; 122*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final String EXTRA_NETWORK_TYPE = "networkType"; 123*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_NO_CONNECTIVITY = "noConnectivity"; 124*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final String EXTRA_OTHER_NETWORK_INFO = "otherNetwork"; 125*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_REASON = "reason"; 126*344a7f5eSAndroid Build Coastguard Worker field public static final int MULTIPATH_PREFERENCE_HANDOVER = 1; // 0x1 127*344a7f5eSAndroid Build Coastguard Worker field public static final int MULTIPATH_PREFERENCE_PERFORMANCE = 4; // 0x4 128*344a7f5eSAndroid Build Coastguard Worker field public static final int MULTIPATH_PREFERENCE_RELIABILITY = 2; // 0x2 129*344a7f5eSAndroid Build Coastguard Worker field public static final int RESTRICT_BACKGROUND_STATUS_DISABLED = 1; // 0x1 130*344a7f5eSAndroid Build Coastguard Worker field public static final int RESTRICT_BACKGROUND_STATUS_ENABLED = 3; // 0x3 131*344a7f5eSAndroid Build Coastguard Worker field public static final int RESTRICT_BACKGROUND_STATUS_WHITELISTED = 2; // 0x2 132*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_BLUETOOTH = 7; // 0x7 133*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_DUMMY = 8; // 0x8 134*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_ETHERNET = 9; // 0x9 135*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_MOBILE = 0; // 0x0 136*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_MOBILE_DUN = 4; // 0x4 137*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_MOBILE_HIPRI = 5; // 0x5 138*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_MOBILE_MMS = 2; // 0x2 139*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_MOBILE_SUPL = 3; // 0x3 140*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_VPN = 17; // 0x11 141*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_WIFI = 1; // 0x1 142*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_WIMAX = 6; // 0x6 143*344a7f5eSAndroid Build Coastguard Worker } 144*344a7f5eSAndroid Build Coastguard Worker 145*344a7f5eSAndroid Build Coastguard Worker public static class ConnectivityManager.NetworkCallback { 146*344a7f5eSAndroid Build Coastguard Worker ctor public ConnectivityManager.NetworkCallback(); 147*344a7f5eSAndroid Build Coastguard Worker ctor public ConnectivityManager.NetworkCallback(int); 148*344a7f5eSAndroid Build Coastguard Worker method public void onAvailable(@NonNull android.net.Network); 149*344a7f5eSAndroid Build Coastguard Worker method public void onBlockedStatusChanged(@NonNull android.net.Network, boolean); 150*344a7f5eSAndroid Build Coastguard Worker method public void onCapabilitiesChanged(@NonNull android.net.Network, @NonNull android.net.NetworkCapabilities); 151*344a7f5eSAndroid Build Coastguard Worker method public void onLinkPropertiesChanged(@NonNull android.net.Network, @NonNull android.net.LinkProperties); 152*344a7f5eSAndroid Build Coastguard Worker method public void onLosing(@NonNull android.net.Network, int); 153*344a7f5eSAndroid Build Coastguard Worker method public void onLost(@NonNull android.net.Network); 154*344a7f5eSAndroid Build Coastguard Worker method public void onUnavailable(); 155*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_INCLUDE_LOCATION_INFO = 1; // 0x1 156*344a7f5eSAndroid Build Coastguard Worker } 157*344a7f5eSAndroid Build Coastguard Worker 158*344a7f5eSAndroid Build Coastguard Worker public static interface ConnectivityManager.OnNetworkActiveListener { 159*344a7f5eSAndroid Build Coastguard Worker method public void onNetworkActive(); 160*344a7f5eSAndroid Build Coastguard Worker } 161*344a7f5eSAndroid Build Coastguard Worker 162*344a7f5eSAndroid Build Coastguard Worker public class DhcpInfo implements android.os.Parcelable { 163*344a7f5eSAndroid Build Coastguard Worker ctor public DhcpInfo(); 164*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 165*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 166*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.DhcpInfo> CREATOR; 167*344a7f5eSAndroid Build Coastguard Worker field public int dns1; 168*344a7f5eSAndroid Build Coastguard Worker field public int dns2; 169*344a7f5eSAndroid Build Coastguard Worker field public int gateway; 170*344a7f5eSAndroid Build Coastguard Worker field public int ipAddress; 171*344a7f5eSAndroid Build Coastguard Worker field public int leaseDuration; 172*344a7f5eSAndroid Build Coastguard Worker field public int netmask; 173*344a7f5eSAndroid Build Coastguard Worker field public int serverAddress; 174*344a7f5eSAndroid Build Coastguard Worker } 175*344a7f5eSAndroid Build Coastguard Worker 176*344a7f5eSAndroid Build Coastguard Worker public final class DnsResolver { 177*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static android.net.DnsResolver getInstance(); 178*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>>); 179*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>>); 180*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[]>); 181*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[]>); 182*344a7f5eSAndroid Build Coastguard Worker field public static final int CLASS_IN = 1; // 0x1 183*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_PARSE = 0; // 0x0 184*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_SYSTEM = 1; // 0x1 185*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_EMPTY = 0; // 0x0 186*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_NO_CACHE_LOOKUP = 4; // 0x4 187*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_NO_CACHE_STORE = 2; // 0x2 188*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_NO_RETRY = 1; // 0x1 189*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_A = 1; // 0x1 190*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_AAAA = 28; // 0x1c 191*344a7f5eSAndroid Build Coastguard Worker } 192*344a7f5eSAndroid Build Coastguard Worker 193*344a7f5eSAndroid Build Coastguard Worker public static interface DnsResolver.Callback<T> { 194*344a7f5eSAndroid Build Coastguard Worker method public void onAnswer(@NonNull T, int); 195*344a7f5eSAndroid Build Coastguard Worker method public void onError(@NonNull android.net.DnsResolver.DnsException); 196*344a7f5eSAndroid Build Coastguard Worker } 197*344a7f5eSAndroid Build Coastguard Worker 198*344a7f5eSAndroid Build Coastguard Worker public static class DnsResolver.DnsException extends java.lang.Exception { 199*344a7f5eSAndroid Build Coastguard Worker ctor public DnsResolver.DnsException(int, @Nullable Throwable); 200*344a7f5eSAndroid Build Coastguard Worker field public final int code; 201*344a7f5eSAndroid Build Coastguard Worker } 202*344a7f5eSAndroid Build Coastguard Worker 203*344a7f5eSAndroid Build Coastguard Worker public class InetAddresses { 204*344a7f5eSAndroid Build Coastguard Worker method public static boolean isNumericAddress(@NonNull String); 205*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static java.net.InetAddress parseNumericAddress(@NonNull String); 206*344a7f5eSAndroid Build Coastguard Worker } 207*344a7f5eSAndroid Build Coastguard Worker 208*344a7f5eSAndroid Build Coastguard Worker public final class IpConfiguration implements android.os.Parcelable { 209*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 210*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.ProxyInfo getHttpProxy(); 211*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.StaticIpConfiguration getStaticIpConfiguration(); 212*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 213*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.IpConfiguration> CREATOR; 214*344a7f5eSAndroid Build Coastguard Worker } 215*344a7f5eSAndroid Build Coastguard Worker 216*344a7f5eSAndroid Build Coastguard Worker public static final class IpConfiguration.Builder { 217*344a7f5eSAndroid Build Coastguard Worker ctor public IpConfiguration.Builder(); 218*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.IpConfiguration build(); 219*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.IpConfiguration.Builder setHttpProxy(@Nullable android.net.ProxyInfo); 220*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.IpConfiguration.Builder setStaticIpConfiguration(@Nullable android.net.StaticIpConfiguration); 221*344a7f5eSAndroid Build Coastguard Worker } 222*344a7f5eSAndroid Build Coastguard Worker 223*344a7f5eSAndroid Build Coastguard Worker public final class IpPrefix implements android.os.Parcelable { 224*344a7f5eSAndroid Build Coastguard Worker ctor public IpPrefix(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int); 225*344a7f5eSAndroid Build Coastguard Worker method public boolean contains(@NonNull java.net.InetAddress); 226*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 227*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.net.InetAddress getAddress(); 228*344a7f5eSAndroid Build Coastguard Worker method @IntRange(from=0, to=128) public int getPrefixLength(); 229*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] getRawAddress(); 230*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 231*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.IpPrefix> CREATOR; 232*344a7f5eSAndroid Build Coastguard Worker } 233*344a7f5eSAndroid Build Coastguard Worker 234*344a7f5eSAndroid Build Coastguard Worker public class LinkAddress implements android.os.Parcelable { 235*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 236*344a7f5eSAndroid Build Coastguard Worker method public java.net.InetAddress getAddress(); 237*344a7f5eSAndroid Build Coastguard Worker method public int getFlags(); 238*344a7f5eSAndroid Build Coastguard Worker method @IntRange(from=0, to=128) public int getPrefixLength(); 239*344a7f5eSAndroid Build Coastguard Worker method public int getScope(); 240*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 241*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.LinkAddress> CREATOR; 242*344a7f5eSAndroid Build Coastguard Worker } 243*344a7f5eSAndroid Build Coastguard Worker 244*344a7f5eSAndroid Build Coastguard Worker public final class LinkProperties implements android.os.Parcelable { 245*344a7f5eSAndroid Build Coastguard Worker ctor public LinkProperties(); 246*344a7f5eSAndroid Build Coastguard Worker method public boolean addRoute(@NonNull android.net.RouteInfo); 247*344a7f5eSAndroid Build Coastguard Worker method public void clear(); 248*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 249*344a7f5eSAndroid Build Coastguard Worker method @Nullable public java.net.Inet4Address getDhcpServerAddress(); 250*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<java.net.InetAddress> getDnsServers(); 251*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getDomains(); 252*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.ProxyInfo getHttpProxy(); 253*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getInterfaceName(); 254*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.net.LinkAddress> getLinkAddresses(); 255*344a7f5eSAndroid Build Coastguard Worker method public int getMtu(); 256*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.IpPrefix getNat64Prefix(); 257*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getPrivateDnsServerName(); 258*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.net.RouteInfo> getRoutes(); 259*344a7f5eSAndroid Build Coastguard Worker method public boolean isPrivateDnsActive(); 260*344a7f5eSAndroid Build Coastguard Worker method public boolean isWakeOnLanSupported(); 261*344a7f5eSAndroid Build Coastguard Worker method public void setDhcpServerAddress(@Nullable java.net.Inet4Address); 262*344a7f5eSAndroid Build Coastguard Worker method public void setDnsServers(@NonNull java.util.Collection<java.net.InetAddress>); 263*344a7f5eSAndroid Build Coastguard Worker method public void setDomains(@Nullable String); 264*344a7f5eSAndroid Build Coastguard Worker method public void setHttpProxy(@Nullable android.net.ProxyInfo); 265*344a7f5eSAndroid Build Coastguard Worker method public void setInterfaceName(@Nullable String); 266*344a7f5eSAndroid Build Coastguard Worker method public void setLinkAddresses(@NonNull java.util.Collection<android.net.LinkAddress>); 267*344a7f5eSAndroid Build Coastguard Worker method public void setMtu(int); 268*344a7f5eSAndroid Build Coastguard Worker method public void setNat64Prefix(@Nullable android.net.IpPrefix); 269*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 270*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.LinkProperties> CREATOR; 271*344a7f5eSAndroid Build Coastguard Worker } 272*344a7f5eSAndroid Build Coastguard Worker 273*344a7f5eSAndroid Build Coastguard Worker public final class MacAddress implements android.os.Parcelable { 274*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 275*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static android.net.MacAddress fromBytes(@NonNull byte[]); 276*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static android.net.MacAddress fromString(@NonNull String); 277*344a7f5eSAndroid Build Coastguard Worker method public int getAddressType(); 278*344a7f5eSAndroid Build Coastguard Worker method @Nullable public java.net.Inet6Address getLinkLocalIpv6FromEui48Mac(); 279*344a7f5eSAndroid Build Coastguard Worker method public boolean isLocallyAssigned(); 280*344a7f5eSAndroid Build Coastguard Worker method public boolean matches(@NonNull android.net.MacAddress, @NonNull android.net.MacAddress); 281*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] toByteArray(); 282*344a7f5eSAndroid Build Coastguard Worker method @NonNull public String toOuiString(); 283*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 284*344a7f5eSAndroid Build Coastguard Worker field public static final android.net.MacAddress BROADCAST_ADDRESS; 285*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.MacAddress> CREATOR; 286*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_BROADCAST = 3; // 0x3 287*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_MULTICAST = 2; // 0x2 288*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_UNICAST = 1; // 0x1 289*344a7f5eSAndroid Build Coastguard Worker } 290*344a7f5eSAndroid Build Coastguard Worker 291*344a7f5eSAndroid Build Coastguard Worker public class Network implements android.os.Parcelable { 292*344a7f5eSAndroid Build Coastguard Worker method public void bindSocket(java.net.DatagramSocket) throws java.io.IOException; 293*344a7f5eSAndroid Build Coastguard Worker method public void bindSocket(java.net.Socket) throws java.io.IOException; 294*344a7f5eSAndroid Build Coastguard Worker method public void bindSocket(java.io.FileDescriptor) throws java.io.IOException; 295*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 296*344a7f5eSAndroid Build Coastguard Worker method public static android.net.Network fromNetworkHandle(long); 297*344a7f5eSAndroid Build Coastguard Worker method public java.net.InetAddress[] getAllByName(String) throws java.net.UnknownHostException; 298*344a7f5eSAndroid Build Coastguard Worker method public java.net.InetAddress getByName(String) throws java.net.UnknownHostException; 299*344a7f5eSAndroid Build Coastguard Worker method public long getNetworkHandle(); 300*344a7f5eSAndroid Build Coastguard Worker method public javax.net.SocketFactory getSocketFactory(); 301*344a7f5eSAndroid Build Coastguard Worker method public java.net.URLConnection openConnection(java.net.URL) throws java.io.IOException; 302*344a7f5eSAndroid Build Coastguard Worker method public java.net.URLConnection openConnection(java.net.URL, java.net.Proxy) throws java.io.IOException; 303*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 304*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.Network> CREATOR; 305*344a7f5eSAndroid Build Coastguard Worker } 306*344a7f5eSAndroid Build Coastguard Worker 307*344a7f5eSAndroid Build Coastguard Worker public final class NetworkCapabilities implements android.os.Parcelable { 308*344a7f5eSAndroid Build Coastguard Worker ctor public NetworkCapabilities(); 309*344a7f5eSAndroid Build Coastguard Worker ctor public NetworkCapabilities(android.net.NetworkCapabilities); 310*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 311*344a7f5eSAndroid Build Coastguard Worker method @NonNull public int[] getCapabilities(); 312*344a7f5eSAndroid Build Coastguard Worker method @NonNull public int[] getEnterpriseIds(); 313*344a7f5eSAndroid Build Coastguard Worker method public int getLinkDownstreamBandwidthKbps(); 314*344a7f5eSAndroid Build Coastguard Worker method public int getLinkUpstreamBandwidthKbps(); 315*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.NetworkSpecifier getNetworkSpecifier(); 316*344a7f5eSAndroid Build Coastguard Worker method public int getOwnerUid(); 317*344a7f5eSAndroid Build Coastguard Worker method public int getSignalStrength(); 318*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.Set<java.lang.Integer> getSubscriptionIds(); 319*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.TransportInfo getTransportInfo(); 320*344a7f5eSAndroid Build Coastguard Worker method public boolean hasCapability(int); 321*344a7f5eSAndroid Build Coastguard Worker method public boolean hasEnterpriseId(int); 322*344a7f5eSAndroid Build Coastguard Worker method public boolean hasTransport(int); 323*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 324*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkCapabilities> CREATOR; 325*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_CAPTIVE_PORTAL = 17; // 0x11 326*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_CBS = 5; // 0x5 327*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_DUN = 2; // 0x2 328*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_EIMS = 10; // 0xa 329*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_ENTERPRISE = 29; // 0x1d 330*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_FOREGROUND = 19; // 0x13 331*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_FOTA = 3; // 0x3 332*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_HEAD_UNIT = 32; // 0x20 333*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_IA = 7; // 0x7 334*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_IMS = 4; // 0x4 335*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_INTERNET = 12; // 0xc 336*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_LOCAL_NETWORK = 36; // 0x24 337*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_MCX = 23; // 0x17 338*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_MMS = 0; // 0x0 339*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_MMTEL = 33; // 0x21 340*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_NOT_CONGESTED = 20; // 0x14 341*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_NOT_METERED = 11; // 0xb 342*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_NOT_RESTRICTED = 13; // 0xd 343*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_NOT_ROAMING = 18; // 0x12 344*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_NOT_SUSPENDED = 21; // 0x15 345*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_NOT_VPN = 15; // 0xf 346*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_PRIORITIZE_BANDWIDTH = 35; // 0x23 347*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_PRIORITIZE_LATENCY = 34; // 0x22 348*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_RCS = 8; // 0x8 349*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_SUPL = 1; // 0x1 350*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_TEMPORARILY_NOT_METERED = 25; // 0x19 351*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_TRUSTED = 14; // 0xe 352*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_VALIDATED = 16; // 0x10 353*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_WIFI_P2P = 6; // 0x6 354*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_XCAP = 9; // 0x9 355*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_ENTERPRISE_ID_1 = 1; // 0x1 356*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_ENTERPRISE_ID_2 = 2; // 0x2 357*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_ENTERPRISE_ID_3 = 3; // 0x3 358*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_ENTERPRISE_ID_4 = 4; // 0x4 359*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_ENTERPRISE_ID_5 = 5; // 0x5 360*344a7f5eSAndroid Build Coastguard Worker field public static final int SIGNAL_STRENGTH_UNSPECIFIED = -2147483648; // 0x80000000 361*344a7f5eSAndroid Build Coastguard Worker field public static final int TRANSPORT_BLUETOOTH = 2; // 0x2 362*344a7f5eSAndroid Build Coastguard Worker field public static final int TRANSPORT_CELLULAR = 0; // 0x0 363*344a7f5eSAndroid Build Coastguard Worker field public static final int TRANSPORT_ETHERNET = 3; // 0x3 364*344a7f5eSAndroid Build Coastguard Worker field public static final int TRANSPORT_LOWPAN = 6; // 0x6 365*344a7f5eSAndroid Build Coastguard Worker field public static final int TRANSPORT_SATELLITE = 10; // 0xa 366*344a7f5eSAndroid Build Coastguard Worker field public static final int TRANSPORT_THREAD = 9; // 0x9 367*344a7f5eSAndroid Build Coastguard Worker field public static final int TRANSPORT_USB = 8; // 0x8 368*344a7f5eSAndroid Build Coastguard Worker field public static final int TRANSPORT_VPN = 4; // 0x4 369*344a7f5eSAndroid Build Coastguard Worker field public static final int TRANSPORT_WIFI = 1; // 0x1 370*344a7f5eSAndroid Build Coastguard Worker field public static final int TRANSPORT_WIFI_AWARE = 5; // 0x5 371*344a7f5eSAndroid Build Coastguard Worker } 372*344a7f5eSAndroid Build Coastguard Worker 373*344a7f5eSAndroid Build Coastguard Worker @Deprecated public class NetworkInfo implements android.os.Parcelable { 374*344a7f5eSAndroid Build Coastguard Worker ctor @Deprecated public NetworkInfo(int, int, @Nullable String, @Nullable String); 375*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public int describeContents(); 376*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @NonNull public android.net.NetworkInfo.DetailedState getDetailedState(); 377*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public String getExtraInfo(); 378*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public String getReason(); 379*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public android.net.NetworkInfo.State getState(); 380*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public int getSubtype(); 381*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public String getSubtypeName(); 382*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public int getType(); 383*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public String getTypeName(); 384*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public boolean isAvailable(); 385*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public boolean isConnected(); 386*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public boolean isConnectedOrConnecting(); 387*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public boolean isFailover(); 388*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public boolean isRoaming(); 389*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void setDetailedState(@NonNull android.net.NetworkInfo.DetailedState, @Nullable String, @Nullable String); 390*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void writeToParcel(android.os.Parcel, int); 391*344a7f5eSAndroid Build Coastguard Worker field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkInfo> CREATOR; 392*344a7f5eSAndroid Build Coastguard Worker } 393*344a7f5eSAndroid Build Coastguard Worker 394*344a7f5eSAndroid Build Coastguard Worker @Deprecated public enum NetworkInfo.DetailedState { 395*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState AUTHENTICATING; 396*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState BLOCKED; 397*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState CAPTIVE_PORTAL_CHECK; 398*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState CONNECTED; 399*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState CONNECTING; 400*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState DISCONNECTED; 401*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState DISCONNECTING; 402*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState FAILED; 403*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState IDLE; 404*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState OBTAINING_IPADDR; 405*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState SCANNING; 406*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState SUSPENDED; 407*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.DetailedState VERIFYING_POOR_LINK; 408*344a7f5eSAndroid Build Coastguard Worker } 409*344a7f5eSAndroid Build Coastguard Worker 410*344a7f5eSAndroid Build Coastguard Worker @Deprecated public enum NetworkInfo.State { 411*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.State CONNECTED; 412*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.State CONNECTING; 413*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.State DISCONNECTED; 414*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.State DISCONNECTING; 415*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.State SUSPENDED; 416*344a7f5eSAndroid Build Coastguard Worker enum_constant @Deprecated public static final android.net.NetworkInfo.State UNKNOWN; 417*344a7f5eSAndroid Build Coastguard Worker } 418*344a7f5eSAndroid Build Coastguard Worker 419*344a7f5eSAndroid Build Coastguard Worker public class NetworkRequest implements android.os.Parcelable { 420*344a7f5eSAndroid Build Coastguard Worker method public boolean canBeSatisfiedBy(@Nullable android.net.NetworkCapabilities); 421*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 422*344a7f5eSAndroid Build Coastguard Worker method @NonNull public int[] getCapabilities(); 423*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.NetworkSpecifier getNetworkSpecifier(); 424*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.Set<java.lang.Integer> getSubscriptionIds(); 425*344a7f5eSAndroid Build Coastguard Worker method @NonNull public int[] getTransportTypes(); 426*344a7f5eSAndroid Build Coastguard Worker method public boolean hasCapability(int); 427*344a7f5eSAndroid Build Coastguard Worker method public boolean hasTransport(int); 428*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 429*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkRequest> CREATOR; 430*344a7f5eSAndroid Build Coastguard Worker } 431*344a7f5eSAndroid Build Coastguard Worker 432*344a7f5eSAndroid Build Coastguard Worker public static class NetworkRequest.Builder { 433*344a7f5eSAndroid Build Coastguard Worker ctor public NetworkRequest.Builder(); 434*344a7f5eSAndroid Build Coastguard Worker ctor public NetworkRequest.Builder(@NonNull android.net.NetworkRequest); 435*344a7f5eSAndroid Build Coastguard Worker method public android.net.NetworkRequest.Builder addCapability(int); 436*344a7f5eSAndroid Build Coastguard Worker method public android.net.NetworkRequest.Builder addTransportType(int); 437*344a7f5eSAndroid Build Coastguard Worker method public android.net.NetworkRequest build(); 438*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkRequest.Builder clearCapabilities(); 439*344a7f5eSAndroid Build Coastguard Worker method public android.net.NetworkRequest.Builder removeCapability(int); 440*344a7f5eSAndroid Build Coastguard Worker method public android.net.NetworkRequest.Builder removeTransportType(int); 441*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkRequest.Builder setIncludeOtherUidNetworks(boolean); 442*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public android.net.NetworkRequest.Builder setNetworkSpecifier(String); 443*344a7f5eSAndroid Build Coastguard Worker method public android.net.NetworkRequest.Builder setNetworkSpecifier(android.net.NetworkSpecifier); 444*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkRequest.Builder setSubscriptionIds(@NonNull java.util.Set<java.lang.Integer>); 445*344a7f5eSAndroid Build Coastguard Worker } 446*344a7f5eSAndroid Build Coastguard Worker 447*344a7f5eSAndroid Build Coastguard Worker public class ParseException extends java.lang.RuntimeException { 448*344a7f5eSAndroid Build Coastguard Worker ctor public ParseException(@NonNull String); 449*344a7f5eSAndroid Build Coastguard Worker ctor public ParseException(@NonNull String, @NonNull Throwable); 450*344a7f5eSAndroid Build Coastguard Worker field public String response; 451*344a7f5eSAndroid Build Coastguard Worker } 452*344a7f5eSAndroid Build Coastguard Worker 453*344a7f5eSAndroid Build Coastguard Worker public class ProxyInfo implements android.os.Parcelable { 454*344a7f5eSAndroid Build Coastguard Worker ctor public ProxyInfo(@Nullable android.net.ProxyInfo); 455*344a7f5eSAndroid Build Coastguard Worker method public static android.net.ProxyInfo buildDirectProxy(String, int); 456*344a7f5eSAndroid Build Coastguard Worker method public static android.net.ProxyInfo buildDirectProxy(String, int, java.util.List<java.lang.String>); 457*344a7f5eSAndroid Build Coastguard Worker method public static android.net.ProxyInfo buildPacProxy(android.net.Uri); 458*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static android.net.ProxyInfo buildPacProxy(@NonNull android.net.Uri, int); 459*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 460*344a7f5eSAndroid Build Coastguard Worker method public String[] getExclusionList(); 461*344a7f5eSAndroid Build Coastguard Worker method public String getHost(); 462*344a7f5eSAndroid Build Coastguard Worker method public android.net.Uri getPacFileUrl(); 463*344a7f5eSAndroid Build Coastguard Worker method public int getPort(); 464*344a7f5eSAndroid Build Coastguard Worker method public boolean isValid(); 465*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 466*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.ProxyInfo> CREATOR; 467*344a7f5eSAndroid Build Coastguard Worker } 468*344a7f5eSAndroid Build Coastguard Worker 469*344a7f5eSAndroid Build Coastguard Worker public final class RouteInfo implements android.os.Parcelable { 470*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 471*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.IpPrefix getDestination(); 472*344a7f5eSAndroid Build Coastguard Worker method @Nullable public java.net.InetAddress getGateway(); 473*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getInterface(); 474*344a7f5eSAndroid Build Coastguard Worker method public int getType(); 475*344a7f5eSAndroid Build Coastguard Worker method public boolean hasGateway(); 476*344a7f5eSAndroid Build Coastguard Worker method public boolean isDefaultRoute(); 477*344a7f5eSAndroid Build Coastguard Worker method public boolean matches(java.net.InetAddress); 478*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 479*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.RouteInfo> CREATOR; 480*344a7f5eSAndroid Build Coastguard Worker field public static final int RTN_THROW = 9; // 0x9 481*344a7f5eSAndroid Build Coastguard Worker field public static final int RTN_UNICAST = 1; // 0x1 482*344a7f5eSAndroid Build Coastguard Worker field public static final int RTN_UNREACHABLE = 7; // 0x7 483*344a7f5eSAndroid Build Coastguard Worker } 484*344a7f5eSAndroid Build Coastguard Worker 485*344a7f5eSAndroid Build Coastguard Worker public abstract class SocketKeepalive implements java.lang.AutoCloseable { 486*344a7f5eSAndroid Build Coastguard Worker method public final void close(); 487*344a7f5eSAndroid Build Coastguard Worker method public final void start(@IntRange(from=0xa, to=0xe10) int); 488*344a7f5eSAndroid Build Coastguard Worker method public final void stop(); 489*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_HARDWARE_ERROR = -31; // 0xffffffe1 490*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INSUFFICIENT_RESOURCES = -32; // 0xffffffe0 491*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INVALID_INTERVAL = -24; // 0xffffffe8 492*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INVALID_IP_ADDRESS = -21; // 0xffffffeb 493*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INVALID_LENGTH = -23; // 0xffffffe9 494*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INVALID_NETWORK = -20; // 0xffffffec 495*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INVALID_PORT = -22; // 0xffffffea 496*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INVALID_SOCKET = -25; // 0xffffffe7 497*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_SOCKET_NOT_IDLE = -26; // 0xffffffe6 498*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_UNSUPPORTED = -30; // 0xffffffe2 499*344a7f5eSAndroid Build Coastguard Worker } 500*344a7f5eSAndroid Build Coastguard Worker 501*344a7f5eSAndroid Build Coastguard Worker public static class SocketKeepalive.Callback { 502*344a7f5eSAndroid Build Coastguard Worker ctor public SocketKeepalive.Callback(); 503*344a7f5eSAndroid Build Coastguard Worker method public void onDataReceived(); 504*344a7f5eSAndroid Build Coastguard Worker method public void onError(int); 505*344a7f5eSAndroid Build Coastguard Worker method public void onStarted(); 506*344a7f5eSAndroid Build Coastguard Worker method public void onStopped(); 507*344a7f5eSAndroid Build Coastguard Worker } 508*344a7f5eSAndroid Build Coastguard Worker 509*344a7f5eSAndroid Build Coastguard Worker public final class StaticIpConfiguration implements android.os.Parcelable { 510*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 511*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<java.net.InetAddress> getDnsServers(); 512*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getDomains(); 513*344a7f5eSAndroid Build Coastguard Worker method @Nullable public java.net.InetAddress getGateway(); 514*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.LinkAddress getIpAddress(); 515*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 516*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.StaticIpConfiguration> CREATOR; 517*344a7f5eSAndroid Build Coastguard Worker } 518*344a7f5eSAndroid Build Coastguard Worker 519*344a7f5eSAndroid Build Coastguard Worker public static final class StaticIpConfiguration.Builder { 520*344a7f5eSAndroid Build Coastguard Worker ctor public StaticIpConfiguration.Builder(); 521*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.StaticIpConfiguration build(); 522*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.StaticIpConfiguration.Builder setDnsServers(@NonNull Iterable<java.net.InetAddress>); 523*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.StaticIpConfiguration.Builder setDomains(@Nullable String); 524*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.StaticIpConfiguration.Builder setGateway(@Nullable java.net.InetAddress); 525*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.StaticIpConfiguration.Builder setIpAddress(@NonNull android.net.LinkAddress); 526*344a7f5eSAndroid Build Coastguard Worker } 527*344a7f5eSAndroid Build Coastguard Worker 528*344a7f5eSAndroid Build Coastguard Worker public interface TransportInfo { 529*344a7f5eSAndroid Build Coastguard Worker } 530*344a7f5eSAndroid Build Coastguard Worker 531*344a7f5eSAndroid Build Coastguard Worker} 532*344a7f5eSAndroid Build Coastguard Worker 533*344a7f5eSAndroid Build Coastguard Workerpackage android.net.http { 534*344a7f5eSAndroid Build Coastguard Worker 535*344a7f5eSAndroid Build Coastguard Worker public abstract class BidirectionalStream { 536*344a7f5eSAndroid Build Coastguard Worker ctor public BidirectionalStream(); 537*344a7f5eSAndroid Build Coastguard Worker method public abstract void cancel(); 538*344a7f5eSAndroid Build Coastguard Worker method public abstract void flush(); 539*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.HeaderBlock getHeaders(); 540*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getHttpMethod(); 541*344a7f5eSAndroid Build Coastguard Worker method public abstract int getPriority(); 542*344a7f5eSAndroid Build Coastguard Worker method public abstract int getTrafficStatsTag(); 543*344a7f5eSAndroid Build Coastguard Worker method public abstract int getTrafficStatsUid(); 544*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean hasTrafficStatsTag(); 545*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean hasTrafficStatsUid(); 546*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean isDelayRequestHeadersUntilFirstFlushEnabled(); 547*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean isDone(); 548*344a7f5eSAndroid Build Coastguard Worker method public abstract void read(@NonNull java.nio.ByteBuffer); 549*344a7f5eSAndroid Build Coastguard Worker method public abstract void start(); 550*344a7f5eSAndroid Build Coastguard Worker method public abstract void write(@NonNull java.nio.ByteBuffer, boolean); 551*344a7f5eSAndroid Build Coastguard Worker field public static final int STREAM_PRIORITY_HIGHEST = 4; // 0x4 552*344a7f5eSAndroid Build Coastguard Worker field public static final int STREAM_PRIORITY_IDLE = 0; // 0x0 553*344a7f5eSAndroid Build Coastguard Worker field public static final int STREAM_PRIORITY_LOW = 2; // 0x2 554*344a7f5eSAndroid Build Coastguard Worker field public static final int STREAM_PRIORITY_LOWEST = 1; // 0x1 555*344a7f5eSAndroid Build Coastguard Worker field public static final int STREAM_PRIORITY_MEDIUM = 3; // 0x3 556*344a7f5eSAndroid Build Coastguard Worker } 557*344a7f5eSAndroid Build Coastguard Worker 558*344a7f5eSAndroid Build Coastguard Worker public abstract static class BidirectionalStream.Builder { 559*344a7f5eSAndroid Build Coastguard Worker ctor public BidirectionalStream.Builder(); 560*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.BidirectionalStream.Builder addHeader(@NonNull String, @NonNull String); 561*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.BidirectionalStream build(); 562*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.BidirectionalStream.Builder setDelayRequestHeadersUntilFirstFlushEnabled(boolean); 563*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.BidirectionalStream.Builder setHttpMethod(@NonNull String); 564*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.BidirectionalStream.Builder setPriority(int); 565*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.BidirectionalStream.Builder setTrafficStatsTag(int); 566*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.BidirectionalStream.Builder setTrafficStatsUid(int); 567*344a7f5eSAndroid Build Coastguard Worker } 568*344a7f5eSAndroid Build Coastguard Worker 569*344a7f5eSAndroid Build Coastguard Worker public static interface BidirectionalStream.Callback { 570*344a7f5eSAndroid Build Coastguard Worker method public void onCanceled(@NonNull android.net.http.BidirectionalStream, @Nullable android.net.http.UrlResponseInfo); 571*344a7f5eSAndroid Build Coastguard Worker method public void onFailed(@NonNull android.net.http.BidirectionalStream, @Nullable android.net.http.UrlResponseInfo, @NonNull android.net.http.HttpException); 572*344a7f5eSAndroid Build Coastguard Worker method public void onReadCompleted(@NonNull android.net.http.BidirectionalStream, @NonNull android.net.http.UrlResponseInfo, @NonNull java.nio.ByteBuffer, boolean); 573*344a7f5eSAndroid Build Coastguard Worker method public void onResponseHeadersReceived(@NonNull android.net.http.BidirectionalStream, @NonNull android.net.http.UrlResponseInfo); 574*344a7f5eSAndroid Build Coastguard Worker method public void onResponseTrailersReceived(@NonNull android.net.http.BidirectionalStream, @NonNull android.net.http.UrlResponseInfo, @NonNull android.net.http.HeaderBlock); 575*344a7f5eSAndroid Build Coastguard Worker method public void onStreamReady(@NonNull android.net.http.BidirectionalStream); 576*344a7f5eSAndroid Build Coastguard Worker method public void onSucceeded(@NonNull android.net.http.BidirectionalStream, @NonNull android.net.http.UrlResponseInfo); 577*344a7f5eSAndroid Build Coastguard Worker method public void onWriteCompleted(@NonNull android.net.http.BidirectionalStream, @NonNull android.net.http.UrlResponseInfo, @NonNull java.nio.ByteBuffer, boolean); 578*344a7f5eSAndroid Build Coastguard Worker } 579*344a7f5eSAndroid Build Coastguard Worker 580*344a7f5eSAndroid Build Coastguard Worker public abstract class CallbackException extends android.net.http.HttpException { 581*344a7f5eSAndroid Build Coastguard Worker ctor protected CallbackException(@Nullable String, @Nullable Throwable); 582*344a7f5eSAndroid Build Coastguard Worker } 583*344a7f5eSAndroid Build Coastguard Worker 584*344a7f5eSAndroid Build Coastguard Worker public class ConnectionMigrationOptions { 585*344a7f5eSAndroid Build Coastguard Worker method public int getAllowNonDefaultNetworkUsage(); 586*344a7f5eSAndroid Build Coastguard Worker method public int getDefaultNetworkMigration(); 587*344a7f5eSAndroid Build Coastguard Worker method public int getPathDegradationMigration(); 588*344a7f5eSAndroid Build Coastguard Worker field public static final int MIGRATION_OPTION_DISABLED = 2; // 0x2 589*344a7f5eSAndroid Build Coastguard Worker field public static final int MIGRATION_OPTION_ENABLED = 1; // 0x1 590*344a7f5eSAndroid Build Coastguard Worker field public static final int MIGRATION_OPTION_UNSPECIFIED = 0; // 0x0 591*344a7f5eSAndroid Build Coastguard Worker } 592*344a7f5eSAndroid Build Coastguard Worker 593*344a7f5eSAndroid Build Coastguard Worker public static final class ConnectionMigrationOptions.Builder { 594*344a7f5eSAndroid Build Coastguard Worker ctor public ConnectionMigrationOptions.Builder(); 595*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.ConnectionMigrationOptions build(); 596*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.ConnectionMigrationOptions.Builder setAllowNonDefaultNetworkUsage(int); 597*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.ConnectionMigrationOptions.Builder setDefaultNetworkMigration(int); 598*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.ConnectionMigrationOptions.Builder setPathDegradationMigration(int); 599*344a7f5eSAndroid Build Coastguard Worker } 600*344a7f5eSAndroid Build Coastguard Worker 601*344a7f5eSAndroid Build Coastguard Worker public final class DnsOptions { 602*344a7f5eSAndroid Build Coastguard Worker method public int getPersistHostCache(); 603*344a7f5eSAndroid Build Coastguard Worker method @Nullable public java.time.Duration getPersistHostCachePeriod(); 604*344a7f5eSAndroid Build Coastguard Worker method public int getPreestablishConnectionsToStaleDnsResults(); 605*344a7f5eSAndroid Build Coastguard Worker method public int getStaleDns(); 606*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.http.DnsOptions.StaleDnsOptions getStaleDnsOptions(); 607*344a7f5eSAndroid Build Coastguard Worker method public int getUseHttpStackDnsResolver(); 608*344a7f5eSAndroid Build Coastguard Worker field public static final int DNS_OPTION_DISABLED = 2; // 0x2 609*344a7f5eSAndroid Build Coastguard Worker field public static final int DNS_OPTION_ENABLED = 1; // 0x1 610*344a7f5eSAndroid Build Coastguard Worker field public static final int DNS_OPTION_UNSPECIFIED = 0; // 0x0 611*344a7f5eSAndroid Build Coastguard Worker } 612*344a7f5eSAndroid Build Coastguard Worker 613*344a7f5eSAndroid Build Coastguard Worker public static final class DnsOptions.Builder { 614*344a7f5eSAndroid Build Coastguard Worker ctor public DnsOptions.Builder(); 615*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions build(); 616*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.Builder setPersistHostCache(int); 617*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.Builder setPersistHostCachePeriod(@NonNull java.time.Duration); 618*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.Builder setPreestablishConnectionsToStaleDnsResults(int); 619*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.Builder setStaleDns(int); 620*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.Builder setStaleDnsOptions(@NonNull android.net.http.DnsOptions.StaleDnsOptions); 621*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.Builder setUseHttpStackDnsResolver(int); 622*344a7f5eSAndroid Build Coastguard Worker } 623*344a7f5eSAndroid Build Coastguard Worker 624*344a7f5eSAndroid Build Coastguard Worker public static class DnsOptions.StaleDnsOptions { 625*344a7f5eSAndroid Build Coastguard Worker method public int getAllowCrossNetworkUsage(); 626*344a7f5eSAndroid Build Coastguard Worker method @Nullable public java.time.Duration getFreshLookupTimeout(); 627*344a7f5eSAndroid Build Coastguard Worker method @Nullable public java.time.Duration getMaxExpiredDelay(); 628*344a7f5eSAndroid Build Coastguard Worker method public int getUseStaleOnNameNotResolved(); 629*344a7f5eSAndroid Build Coastguard Worker } 630*344a7f5eSAndroid Build Coastguard Worker 631*344a7f5eSAndroid Build Coastguard Worker public static final class DnsOptions.StaleDnsOptions.Builder { 632*344a7f5eSAndroid Build Coastguard Worker ctor public DnsOptions.StaleDnsOptions.Builder(); 633*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.StaleDnsOptions build(); 634*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.StaleDnsOptions.Builder setAllowCrossNetworkUsage(int); 635*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.StaleDnsOptions.Builder setFreshLookupTimeout(@NonNull java.time.Duration); 636*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.StaleDnsOptions.Builder setMaxExpiredDelay(@NonNull java.time.Duration); 637*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.DnsOptions.StaleDnsOptions.Builder setUseStaleOnNameNotResolved(int); 638*344a7f5eSAndroid Build Coastguard Worker } 639*344a7f5eSAndroid Build Coastguard Worker 640*344a7f5eSAndroid Build Coastguard Worker public abstract class HeaderBlock { 641*344a7f5eSAndroid Build Coastguard Worker ctor public HeaderBlock(); 642*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> getAsList(); 643*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAsMap(); 644*344a7f5eSAndroid Build Coastguard Worker } 645*344a7f5eSAndroid Build Coastguard Worker 646*344a7f5eSAndroid Build Coastguard Worker public abstract class HttpEngine { 647*344a7f5eSAndroid Build Coastguard Worker method public void bindToNetwork(@Nullable android.net.Network); 648*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.net.URLStreamHandlerFactory createUrlStreamHandlerFactory(); 649*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static String getVersionString(); 650*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.BidirectionalStream.Builder newBidirectionalStreamBuilder(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.net.http.BidirectionalStream.Callback); 651*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest.Builder newUrlRequestBuilder(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.net.http.UrlRequest.Callback); 652*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.net.URLConnection openConnection(@NonNull java.net.URL) throws java.io.IOException; 653*344a7f5eSAndroid Build Coastguard Worker method public abstract void shutdown(); 654*344a7f5eSAndroid Build Coastguard Worker } 655*344a7f5eSAndroid Build Coastguard Worker 656*344a7f5eSAndroid Build Coastguard Worker public static class HttpEngine.Builder { 657*344a7f5eSAndroid Build Coastguard Worker ctor public HttpEngine.Builder(@NonNull android.content.Context); 658*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder addPublicKeyPins(@NonNull String, @NonNull java.util.Set<byte[]>, boolean, @NonNull java.time.Instant); 659*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder addQuicHint(@NonNull String, int, int); 660*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine build(); 661*344a7f5eSAndroid Build Coastguard Worker method @NonNull public String getDefaultUserAgent(); 662*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder setConnectionMigrationOptions(@NonNull android.net.http.ConnectionMigrationOptions); 663*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder setDnsOptions(@NonNull android.net.http.DnsOptions); 664*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder setEnableBrotli(boolean); 665*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder setEnableHttp2(boolean); 666*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder setEnableHttpCache(int, long); 667*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder setEnablePublicKeyPinningBypassForLocalTrustAnchors(boolean); 668*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder setEnableQuic(boolean); 669*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder setQuicOptions(@NonNull android.net.http.QuicOptions); 670*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder setStoragePath(@NonNull String); 671*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.HttpEngine.Builder setUserAgent(@NonNull String); 672*344a7f5eSAndroid Build Coastguard Worker field public static final int HTTP_CACHE_DISABLED = 0; // 0x0 673*344a7f5eSAndroid Build Coastguard Worker field public static final int HTTP_CACHE_DISK = 3; // 0x3 674*344a7f5eSAndroid Build Coastguard Worker field public static final int HTTP_CACHE_DISK_NO_HTTP = 2; // 0x2 675*344a7f5eSAndroid Build Coastguard Worker field public static final int HTTP_CACHE_IN_MEMORY = 1; // 0x1 676*344a7f5eSAndroid Build Coastguard Worker } 677*344a7f5eSAndroid Build Coastguard Worker 678*344a7f5eSAndroid Build Coastguard Worker public class HttpException extends java.io.IOException { 679*344a7f5eSAndroid Build Coastguard Worker ctor public HttpException(@Nullable String, @Nullable Throwable); 680*344a7f5eSAndroid Build Coastguard Worker } 681*344a7f5eSAndroid Build Coastguard Worker 682*344a7f5eSAndroid Build Coastguard Worker public final class InlineExecutionProhibitedException extends java.util.concurrent.RejectedExecutionException { 683*344a7f5eSAndroid Build Coastguard Worker ctor public InlineExecutionProhibitedException(); 684*344a7f5eSAndroid Build Coastguard Worker } 685*344a7f5eSAndroid Build Coastguard Worker 686*344a7f5eSAndroid Build Coastguard Worker public abstract class NetworkException extends android.net.http.HttpException { 687*344a7f5eSAndroid Build Coastguard Worker ctor public NetworkException(@Nullable String, @Nullable Throwable); 688*344a7f5eSAndroid Build Coastguard Worker method public abstract int getErrorCode(); 689*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean isImmediatelyRetryable(); 690*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_ADDRESS_UNREACHABLE = 9; // 0x9 691*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_CONNECTION_CLOSED = 5; // 0x5 692*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_CONNECTION_REFUSED = 7; // 0x7 693*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_CONNECTION_RESET = 8; // 0x8 694*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_CONNECTION_TIMED_OUT = 6; // 0x6 695*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_HOSTNAME_NOT_RESOLVED = 1; // 0x1 696*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INTERNET_DISCONNECTED = 2; // 0x2 697*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_NETWORK_CHANGED = 3; // 0x3 698*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_OTHER = 11; // 0xb 699*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_QUIC_PROTOCOL_FAILED = 10; // 0xa 700*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_TIMED_OUT = 4; // 0x4 701*344a7f5eSAndroid Build Coastguard Worker } 702*344a7f5eSAndroid Build Coastguard Worker 703*344a7f5eSAndroid Build Coastguard Worker public abstract class QuicException extends android.net.http.NetworkException { 704*344a7f5eSAndroid Build Coastguard Worker ctor protected QuicException(@Nullable String, @Nullable Throwable); 705*344a7f5eSAndroid Build Coastguard Worker } 706*344a7f5eSAndroid Build Coastguard Worker 707*344a7f5eSAndroid Build Coastguard Worker public class QuicOptions { 708*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.Set<java.lang.String> getAllowedQuicHosts(); 709*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getHandshakeUserAgent(); 710*344a7f5eSAndroid Build Coastguard Worker method @Nullable public java.time.Duration getIdleConnectionTimeout(); 711*344a7f5eSAndroid Build Coastguard Worker method public int getInMemoryServerConfigsCacheSize(); 712*344a7f5eSAndroid Build Coastguard Worker method public boolean hasInMemoryServerConfigsCacheSize(); 713*344a7f5eSAndroid Build Coastguard Worker } 714*344a7f5eSAndroid Build Coastguard Worker 715*344a7f5eSAndroid Build Coastguard Worker public static final class QuicOptions.Builder { 716*344a7f5eSAndroid Build Coastguard Worker ctor public QuicOptions.Builder(); 717*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.QuicOptions.Builder addAllowedQuicHost(@NonNull String); 718*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.QuicOptions build(); 719*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.QuicOptions.Builder setHandshakeUserAgent(@NonNull String); 720*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.QuicOptions.Builder setIdleConnectionTimeout(@NonNull java.time.Duration); 721*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.http.QuicOptions.Builder setInMemoryServerConfigsCacheSize(int); 722*344a7f5eSAndroid Build Coastguard Worker } 723*344a7f5eSAndroid Build Coastguard Worker 724*344a7f5eSAndroid Build Coastguard Worker public abstract class UploadDataProvider implements java.io.Closeable { 725*344a7f5eSAndroid Build Coastguard Worker ctor public UploadDataProvider(); 726*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 727*344a7f5eSAndroid Build Coastguard Worker method public abstract long getLength() throws java.io.IOException; 728*344a7f5eSAndroid Build Coastguard Worker method public abstract void read(@NonNull android.net.http.UploadDataSink, @NonNull java.nio.ByteBuffer) throws java.io.IOException; 729*344a7f5eSAndroid Build Coastguard Worker method public abstract void rewind(@NonNull android.net.http.UploadDataSink) throws java.io.IOException; 730*344a7f5eSAndroid Build Coastguard Worker } 731*344a7f5eSAndroid Build Coastguard Worker 732*344a7f5eSAndroid Build Coastguard Worker public abstract class UploadDataSink { 733*344a7f5eSAndroid Build Coastguard Worker ctor public UploadDataSink(); 734*344a7f5eSAndroid Build Coastguard Worker method public abstract void onReadError(@NonNull Exception); 735*344a7f5eSAndroid Build Coastguard Worker method public abstract void onReadSucceeded(boolean); 736*344a7f5eSAndroid Build Coastguard Worker method public abstract void onRewindError(@NonNull Exception); 737*344a7f5eSAndroid Build Coastguard Worker method public abstract void onRewindSucceeded(); 738*344a7f5eSAndroid Build Coastguard Worker } 739*344a7f5eSAndroid Build Coastguard Worker 740*344a7f5eSAndroid Build Coastguard Worker public abstract class UrlRequest { 741*344a7f5eSAndroid Build Coastguard Worker method public abstract void cancel(); 742*344a7f5eSAndroid Build Coastguard Worker method public abstract void followRedirect(); 743*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.HeaderBlock getHeaders(); 744*344a7f5eSAndroid Build Coastguard Worker method @Nullable public abstract String getHttpMethod(); 745*344a7f5eSAndroid Build Coastguard Worker method public abstract int getPriority(); 746*344a7f5eSAndroid Build Coastguard Worker method public abstract void getStatus(@NonNull android.net.http.UrlRequest.StatusListener); 747*344a7f5eSAndroid Build Coastguard Worker method public abstract int getTrafficStatsTag(); 748*344a7f5eSAndroid Build Coastguard Worker method public abstract int getTrafficStatsUid(); 749*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean hasTrafficStatsTag(); 750*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean hasTrafficStatsUid(); 751*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean isCacheDisabled(); 752*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean isDirectExecutorAllowed(); 753*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean isDone(); 754*344a7f5eSAndroid Build Coastguard Worker method public abstract void read(@NonNull java.nio.ByteBuffer); 755*344a7f5eSAndroid Build Coastguard Worker method public abstract void start(); 756*344a7f5eSAndroid Build Coastguard Worker field public static final int REQUEST_PRIORITY_HIGHEST = 4; // 0x4 757*344a7f5eSAndroid Build Coastguard Worker field public static final int REQUEST_PRIORITY_IDLE = 0; // 0x0 758*344a7f5eSAndroid Build Coastguard Worker field public static final int REQUEST_PRIORITY_LOW = 2; // 0x2 759*344a7f5eSAndroid Build Coastguard Worker field public static final int REQUEST_PRIORITY_LOWEST = 1; // 0x1 760*344a7f5eSAndroid Build Coastguard Worker field public static final int REQUEST_PRIORITY_MEDIUM = 3; // 0x3 761*344a7f5eSAndroid Build Coastguard Worker } 762*344a7f5eSAndroid Build Coastguard Worker 763*344a7f5eSAndroid Build Coastguard Worker public abstract static class UrlRequest.Builder { 764*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest.Builder addHeader(@NonNull String, @NonNull String); 765*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest.Builder bindToNetwork(@Nullable android.net.Network); 766*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest build(); 767*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest.Builder setCacheDisabled(boolean); 768*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest.Builder setDirectExecutorAllowed(boolean); 769*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest.Builder setHttpMethod(@NonNull String); 770*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest.Builder setPriority(int); 771*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest.Builder setTrafficStatsTag(int); 772*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest.Builder setTrafficStatsUid(int); 773*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.UrlRequest.Builder setUploadDataProvider(@NonNull android.net.http.UploadDataProvider, @NonNull java.util.concurrent.Executor); 774*344a7f5eSAndroid Build Coastguard Worker } 775*344a7f5eSAndroid Build Coastguard Worker 776*344a7f5eSAndroid Build Coastguard Worker public static interface UrlRequest.Callback { 777*344a7f5eSAndroid Build Coastguard Worker method public void onCanceled(@NonNull android.net.http.UrlRequest, @Nullable android.net.http.UrlResponseInfo); 778*344a7f5eSAndroid Build Coastguard Worker method public void onFailed(@NonNull android.net.http.UrlRequest, @Nullable android.net.http.UrlResponseInfo, @NonNull android.net.http.HttpException); 779*344a7f5eSAndroid Build Coastguard Worker method public void onReadCompleted(@NonNull android.net.http.UrlRequest, @NonNull android.net.http.UrlResponseInfo, @NonNull java.nio.ByteBuffer) throws java.lang.Exception; 780*344a7f5eSAndroid Build Coastguard Worker method public void onRedirectReceived(@NonNull android.net.http.UrlRequest, @NonNull android.net.http.UrlResponseInfo, @NonNull String) throws java.lang.Exception; 781*344a7f5eSAndroid Build Coastguard Worker method public void onResponseStarted(@NonNull android.net.http.UrlRequest, @NonNull android.net.http.UrlResponseInfo) throws java.lang.Exception; 782*344a7f5eSAndroid Build Coastguard Worker method public void onSucceeded(@NonNull android.net.http.UrlRequest, @NonNull android.net.http.UrlResponseInfo); 783*344a7f5eSAndroid Build Coastguard Worker } 784*344a7f5eSAndroid Build Coastguard Worker 785*344a7f5eSAndroid Build Coastguard Worker public static class UrlRequest.Status { 786*344a7f5eSAndroid Build Coastguard Worker field public static final int CONNECTING = 10; // 0xa 787*344a7f5eSAndroid Build Coastguard Worker field public static final int DOWNLOADING_PAC_FILE = 5; // 0x5 788*344a7f5eSAndroid Build Coastguard Worker field public static final int ESTABLISHING_PROXY_TUNNEL = 8; // 0x8 789*344a7f5eSAndroid Build Coastguard Worker field public static final int IDLE = 0; // 0x0 790*344a7f5eSAndroid Build Coastguard Worker field public static final int INVALID = -1; // 0xffffffff 791*344a7f5eSAndroid Build Coastguard Worker field public static final int READING_RESPONSE = 14; // 0xe 792*344a7f5eSAndroid Build Coastguard Worker field public static final int RESOLVING_HOST = 9; // 0x9 793*344a7f5eSAndroid Build Coastguard Worker field public static final int RESOLVING_HOST_IN_PAC_FILE = 7; // 0x7 794*344a7f5eSAndroid Build Coastguard Worker field public static final int RESOLVING_PROXY_FOR_URL = 6; // 0x6 795*344a7f5eSAndroid Build Coastguard Worker field public static final int SENDING_REQUEST = 12; // 0xc 796*344a7f5eSAndroid Build Coastguard Worker field public static final int SSL_HANDSHAKE = 11; // 0xb 797*344a7f5eSAndroid Build Coastguard Worker field public static final int WAITING_FOR_AVAILABLE_SOCKET = 2; // 0x2 798*344a7f5eSAndroid Build Coastguard Worker field public static final int WAITING_FOR_CACHE = 4; // 0x4 799*344a7f5eSAndroid Build Coastguard Worker field public static final int WAITING_FOR_DELEGATE = 3; // 0x3 800*344a7f5eSAndroid Build Coastguard Worker field public static final int WAITING_FOR_RESPONSE = 13; // 0xd 801*344a7f5eSAndroid Build Coastguard Worker field public static final int WAITING_FOR_STALLED_SOCKET_POOL = 1; // 0x1 802*344a7f5eSAndroid Build Coastguard Worker } 803*344a7f5eSAndroid Build Coastguard Worker 804*344a7f5eSAndroid Build Coastguard Worker public static interface UrlRequest.StatusListener { 805*344a7f5eSAndroid Build Coastguard Worker method public void onStatus(int); 806*344a7f5eSAndroid Build Coastguard Worker } 807*344a7f5eSAndroid Build Coastguard Worker 808*344a7f5eSAndroid Build Coastguard Worker public abstract class UrlResponseInfo { 809*344a7f5eSAndroid Build Coastguard Worker ctor public UrlResponseInfo(); 810*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.net.http.HeaderBlock getHeaders(); 811*344a7f5eSAndroid Build Coastguard Worker method public abstract int getHttpStatusCode(); 812*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getHttpStatusText(); 813*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getNegotiatedProtocol(); 814*344a7f5eSAndroid Build Coastguard Worker method public abstract long getReceivedByteCount(); 815*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getUrl(); 816*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.util.List<java.lang.String> getUrlChain(); 817*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean wasCached(); 818*344a7f5eSAndroid Build Coastguard Worker } 819*344a7f5eSAndroid Build Coastguard Worker 820*344a7f5eSAndroid Build Coastguard Worker} 821*344a7f5eSAndroid Build Coastguard Worker 822