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 void logEvent(int, @NonNull String); 6*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void reevaluateNetwork(); 7*344a7f5eSAndroid Build Coastguard Worker method public void useNetwork(); 8*344a7f5eSAndroid Build Coastguard Worker field public static final int APP_REQUEST_REEVALUATION_REQUIRED = 100; // 0x64 9*344a7f5eSAndroid Build Coastguard Worker field public static final int APP_RETURN_DISMISSED = 0; // 0x0 10*344a7f5eSAndroid Build Coastguard Worker field public static final int APP_RETURN_UNWANTED = 1; // 0x1 11*344a7f5eSAndroid Build Coastguard Worker field public static final int APP_RETURN_WANTED_AS_IS = 2; // 0x2 12*344a7f5eSAndroid Build Coastguard Worker } 13*344a7f5eSAndroid Build Coastguard Worker 14*344a7f5eSAndroid Build Coastguard Worker public final class CaptivePortalData implements android.os.Parcelable { 15*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 16*344a7f5eSAndroid Build Coastguard Worker method public long getByteLimit(); 17*344a7f5eSAndroid Build Coastguard Worker method public long getExpiryTimeMillis(); 18*344a7f5eSAndroid Build Coastguard Worker method public long getRefreshTimeMillis(); 19*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.Uri getUserPortalUrl(); 20*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.Uri getVenueInfoUrl(); 21*344a7f5eSAndroid Build Coastguard Worker method public boolean isCaptive(); 22*344a7f5eSAndroid Build Coastguard Worker method public boolean isSessionExtendable(); 23*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 24*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.CaptivePortalData> CREATOR; 25*344a7f5eSAndroid Build Coastguard Worker } 26*344a7f5eSAndroid Build Coastguard Worker 27*344a7f5eSAndroid Build Coastguard Worker public static class CaptivePortalData.Builder { 28*344a7f5eSAndroid Build Coastguard Worker ctor public CaptivePortalData.Builder(); 29*344a7f5eSAndroid Build Coastguard Worker ctor public CaptivePortalData.Builder(@Nullable android.net.CaptivePortalData); 30*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.CaptivePortalData build(); 31*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.CaptivePortalData.Builder setBytesRemaining(long); 32*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.CaptivePortalData.Builder setCaptive(boolean); 33*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.CaptivePortalData.Builder setExpiryTime(long); 34*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.CaptivePortalData.Builder setRefreshTime(long); 35*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.CaptivePortalData.Builder setSessionExtendable(boolean); 36*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.CaptivePortalData.Builder setUserPortalUrl(@Nullable android.net.Uri); 37*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.CaptivePortalData.Builder setVenueInfoUrl(@Nullable android.net.Uri); 38*344a7f5eSAndroid Build Coastguard Worker } 39*344a7f5eSAndroid Build Coastguard Worker 40*344a7f5eSAndroid Build Coastguard Worker public class ConnectivityManager { 41*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD) public android.net.SocketKeepalive createNattKeepalive(@NonNull android.net.Network, @NonNull android.os.ParcelFileDescriptor, @NonNull java.net.InetAddress, @NonNull java.net.InetAddress, @NonNull java.util.concurrent.Executor, @NonNull android.net.SocketKeepalive.Callback); 42*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD) public android.net.SocketKeepalive createSocketKeepalive(@NonNull android.net.Network, @NonNull java.net.Socket, @NonNull java.util.concurrent.Executor, @NonNull android.net.SocketKeepalive.Callback); 43*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String getCaptivePortalServerUrl(); 44*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void getLatestTetheringEntitlementResult(int, boolean, @NonNull java.util.concurrent.Executor, @NonNull android.net.ConnectivityManager.OnTetheringEntitlementResultListener); 45*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.WRITE_SETTINGS}) public boolean isTetheringSupported(); 46*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_FACTORY}) public int registerNetworkProvider(@NonNull android.net.NetworkProvider); 47*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void registerTetheringEventCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.ConnectivityManager.OnTetheringEventCallback); 48*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public void requestNetwork(@NonNull android.net.NetworkRequest, int, int, @NonNull android.os.Handler, @NonNull android.net.ConnectivityManager.NetworkCallback); 49*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_AIRPLANE_MODE, android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void setAirplaneMode(boolean); 50*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public boolean shouldAvoidBadWifi(); 51*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public void startCaptivePortalApp(@NonNull android.net.Network, @NonNull android.os.Bundle); 52*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void startTethering(int, boolean, android.net.ConnectivityManager.OnStartTetheringCallback); 53*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void startTethering(int, boolean, android.net.ConnectivityManager.OnStartTetheringCallback, android.os.Handler); 54*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void stopTethering(int); 55*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_FACTORY}) public void unregisterNetworkProvider(@NonNull android.net.NetworkProvider); 56*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void unregisterTetheringEventCallback(@NonNull android.net.ConnectivityManager.OnTetheringEventCallback); 57*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_CAPTIVE_PORTAL_PROBE_SPEC = "android.net.extra.CAPTIVE_PORTAL_PROBE_SPEC"; 58*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT = "android.net.extra.CAPTIVE_PORTAL_USER_AGENT"; 59*344a7f5eSAndroid Build Coastguard Worker field public static final int TETHERING_BLUETOOTH = 2; // 0x2 60*344a7f5eSAndroid Build Coastguard Worker field public static final int TETHERING_USB = 1; // 0x1 61*344a7f5eSAndroid Build Coastguard Worker field public static final int TETHERING_WIFI = 0; // 0x0 62*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TETHER_ERROR_ENTITLEMENT_UNKONWN = 13; // 0xd 63*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TETHER_ERROR_NO_ERROR = 0; // 0x0 64*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TETHER_ERROR_PROVISION_FAILED = 11; // 0xb 65*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_NONE = -1; // 0xffffffff 66*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int TYPE_WIFI_P2P = 13; // 0xd 67*344a7f5eSAndroid Build Coastguard Worker } 68*344a7f5eSAndroid Build Coastguard Worker 69*344a7f5eSAndroid Build Coastguard Worker @Deprecated public abstract static class ConnectivityManager.OnStartTetheringCallback { 70*344a7f5eSAndroid Build Coastguard Worker ctor @Deprecated public ConnectivityManager.OnStartTetheringCallback(); 71*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void onTetheringFailed(); 72*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void onTetheringStarted(); 73*344a7f5eSAndroid Build Coastguard Worker } 74*344a7f5eSAndroid Build Coastguard Worker 75*344a7f5eSAndroid Build Coastguard Worker @Deprecated public static interface ConnectivityManager.OnTetheringEntitlementResultListener { 76*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void onTetheringEntitlementResult(int); 77*344a7f5eSAndroid Build Coastguard Worker } 78*344a7f5eSAndroid Build Coastguard Worker 79*344a7f5eSAndroid Build Coastguard Worker @Deprecated public abstract static class ConnectivityManager.OnTetheringEventCallback { 80*344a7f5eSAndroid Build Coastguard Worker ctor @Deprecated public ConnectivityManager.OnTetheringEventCallback(); 81*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void onUpstreamChanged(@Nullable android.net.Network); 82*344a7f5eSAndroid Build Coastguard Worker } 83*344a7f5eSAndroid Build Coastguard Worker 84*344a7f5eSAndroid Build Coastguard Worker public final class InvalidPacketException extends java.lang.Exception { 85*344a7f5eSAndroid Build Coastguard Worker ctor public InvalidPacketException(int); 86*344a7f5eSAndroid Build Coastguard Worker method public int getError(); 87*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INVALID_IP_ADDRESS = -21; // 0xffffffeb 88*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INVALID_LENGTH = -23; // 0xffffffe9 89*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_INVALID_PORT = -22; // 0xffffffea 90*344a7f5eSAndroid Build Coastguard Worker } 91*344a7f5eSAndroid Build Coastguard Worker 92*344a7f5eSAndroid Build Coastguard Worker public final class IpConfiguration implements android.os.Parcelable { 93*344a7f5eSAndroid Build Coastguard Worker ctor public IpConfiguration(); 94*344a7f5eSAndroid Build Coastguard Worker ctor public IpConfiguration(@NonNull android.net.IpConfiguration); 95*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 96*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.ProxyInfo getHttpProxy(); 97*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.IpConfiguration.IpAssignment getIpAssignment(); 98*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.IpConfiguration.ProxySettings getProxySettings(); 99*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.StaticIpConfiguration getStaticIpConfiguration(); 100*344a7f5eSAndroid Build Coastguard Worker method public void setHttpProxy(@Nullable android.net.ProxyInfo); 101*344a7f5eSAndroid Build Coastguard Worker method public void setIpAssignment(@NonNull android.net.IpConfiguration.IpAssignment); 102*344a7f5eSAndroid Build Coastguard Worker method public void setProxySettings(@NonNull android.net.IpConfiguration.ProxySettings); 103*344a7f5eSAndroid Build Coastguard Worker method public void setStaticIpConfiguration(@Nullable android.net.StaticIpConfiguration); 104*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 105*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.IpConfiguration> CREATOR; 106*344a7f5eSAndroid Build Coastguard Worker } 107*344a7f5eSAndroid Build Coastguard Worker 108*344a7f5eSAndroid Build Coastguard Worker public enum IpConfiguration.IpAssignment { 109*344a7f5eSAndroid Build Coastguard Worker enum_constant public static final android.net.IpConfiguration.IpAssignment DHCP; 110*344a7f5eSAndroid Build Coastguard Worker enum_constant public static final android.net.IpConfiguration.IpAssignment STATIC; 111*344a7f5eSAndroid Build Coastguard Worker enum_constant public static final android.net.IpConfiguration.IpAssignment UNASSIGNED; 112*344a7f5eSAndroid Build Coastguard Worker } 113*344a7f5eSAndroid Build Coastguard Worker 114*344a7f5eSAndroid Build Coastguard Worker public enum IpConfiguration.ProxySettings { 115*344a7f5eSAndroid Build Coastguard Worker enum_constant public static final android.net.IpConfiguration.ProxySettings NONE; 116*344a7f5eSAndroid Build Coastguard Worker enum_constant public static final android.net.IpConfiguration.ProxySettings PAC; 117*344a7f5eSAndroid Build Coastguard Worker enum_constant public static final android.net.IpConfiguration.ProxySettings STATIC; 118*344a7f5eSAndroid Build Coastguard Worker enum_constant public static final android.net.IpConfiguration.ProxySettings UNASSIGNED; 119*344a7f5eSAndroid Build Coastguard Worker } 120*344a7f5eSAndroid Build Coastguard Worker 121*344a7f5eSAndroid Build Coastguard Worker public final class IpPrefix implements android.os.Parcelable { 122*344a7f5eSAndroid Build Coastguard Worker ctor public IpPrefix(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int); 123*344a7f5eSAndroid Build Coastguard Worker ctor public IpPrefix(@NonNull String); 124*344a7f5eSAndroid Build Coastguard Worker } 125*344a7f5eSAndroid Build Coastguard Worker 126*344a7f5eSAndroid Build Coastguard Worker public class KeepalivePacketData { 127*344a7f5eSAndroid Build Coastguard Worker ctor protected KeepalivePacketData(@NonNull java.net.InetAddress, @IntRange(from=0, to=65535) int, @NonNull java.net.InetAddress, @IntRange(from=0, to=65535) int, @NonNull byte[]) throws android.net.InvalidPacketException; 128*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.net.InetAddress getDstAddress(); 129*344a7f5eSAndroid Build Coastguard Worker method public int getDstPort(); 130*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] getPacket(); 131*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.net.InetAddress getSrcAddress(); 132*344a7f5eSAndroid Build Coastguard Worker method public int getSrcPort(); 133*344a7f5eSAndroid Build Coastguard Worker } 134*344a7f5eSAndroid Build Coastguard Worker 135*344a7f5eSAndroid Build Coastguard Worker public class LinkAddress implements android.os.Parcelable { 136*344a7f5eSAndroid Build Coastguard Worker ctor public LinkAddress(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int, int, int); 137*344a7f5eSAndroid Build Coastguard Worker ctor public LinkAddress(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int, int, int, long, long); 138*344a7f5eSAndroid Build Coastguard Worker ctor public LinkAddress(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int); 139*344a7f5eSAndroid Build Coastguard Worker ctor public LinkAddress(@NonNull String); 140*344a7f5eSAndroid Build Coastguard Worker ctor public LinkAddress(@NonNull String, int, int); 141*344a7f5eSAndroid Build Coastguard Worker method public long getDeprecationTime(); 142*344a7f5eSAndroid Build Coastguard Worker method public long getExpirationTime(); 143*344a7f5eSAndroid Build Coastguard Worker method public boolean isGlobalPreferred(); 144*344a7f5eSAndroid Build Coastguard Worker method public boolean isIpv4(); 145*344a7f5eSAndroid Build Coastguard Worker method public boolean isIpv6(); 146*344a7f5eSAndroid Build Coastguard Worker method public boolean isSameAddressAs(@Nullable android.net.LinkAddress); 147*344a7f5eSAndroid Build Coastguard Worker field public static final long LIFETIME_PERMANENT = 9223372036854775807L; // 0x7fffffffffffffffL 148*344a7f5eSAndroid Build Coastguard Worker field public static final long LIFETIME_UNKNOWN = -1L; // 0xffffffffffffffffL 149*344a7f5eSAndroid Build Coastguard Worker } 150*344a7f5eSAndroid Build Coastguard Worker 151*344a7f5eSAndroid Build Coastguard Worker public final class LinkProperties implements android.os.Parcelable { 152*344a7f5eSAndroid Build Coastguard Worker ctor public LinkProperties(@Nullable android.net.LinkProperties); 153*344a7f5eSAndroid Build Coastguard Worker ctor public LinkProperties(@Nullable android.net.LinkProperties, boolean); 154*344a7f5eSAndroid Build Coastguard Worker method public boolean addDnsServer(@NonNull java.net.InetAddress); 155*344a7f5eSAndroid Build Coastguard Worker method public boolean addLinkAddress(@NonNull android.net.LinkAddress); 156*344a7f5eSAndroid Build Coastguard Worker method public boolean addPcscfServer(@NonNull java.net.InetAddress); 157*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<java.net.InetAddress> getAddresses(); 158*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<java.lang.String> getAllInterfaceNames(); 159*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.net.LinkAddress> getAllLinkAddresses(); 160*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.net.RouteInfo> getAllRoutes(); 161*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.Uri getCaptivePortalApiUrl(); 162*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.CaptivePortalData getCaptivePortalData(); 163*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<java.net.InetAddress> getPcscfServers(); 164*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getTcpBufferSizes(); 165*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers(); 166*344a7f5eSAndroid Build Coastguard Worker method public boolean hasGlobalIpv6Address(); 167*344a7f5eSAndroid Build Coastguard Worker method public boolean hasIpv4Address(); 168*344a7f5eSAndroid Build Coastguard Worker method public boolean hasIpv4DefaultRoute(); 169*344a7f5eSAndroid Build Coastguard Worker method public boolean hasIpv4DnsServer(); 170*344a7f5eSAndroid Build Coastguard Worker method public boolean hasIpv6DefaultRoute(); 171*344a7f5eSAndroid Build Coastguard Worker method public boolean hasIpv6DnsServer(); 172*344a7f5eSAndroid Build Coastguard Worker method public boolean isIpv4Provisioned(); 173*344a7f5eSAndroid Build Coastguard Worker method public boolean isIpv6Provisioned(); 174*344a7f5eSAndroid Build Coastguard Worker method public boolean isProvisioned(); 175*344a7f5eSAndroid Build Coastguard Worker method public boolean isReachable(@NonNull java.net.InetAddress); 176*344a7f5eSAndroid Build Coastguard Worker method public boolean removeDnsServer(@NonNull java.net.InetAddress); 177*344a7f5eSAndroid Build Coastguard Worker method public boolean removeLinkAddress(@NonNull android.net.LinkAddress); 178*344a7f5eSAndroid Build Coastguard Worker method public boolean removeRoute(@NonNull android.net.RouteInfo); 179*344a7f5eSAndroid Build Coastguard Worker method public void setCaptivePortalApiUrl(@Nullable android.net.Uri); 180*344a7f5eSAndroid Build Coastguard Worker method public void setCaptivePortalData(@Nullable android.net.CaptivePortalData); 181*344a7f5eSAndroid Build Coastguard Worker method public void setPcscfServers(@NonNull java.util.Collection<java.net.InetAddress>); 182*344a7f5eSAndroid Build Coastguard Worker method public void setPrivateDnsServerName(@Nullable String); 183*344a7f5eSAndroid Build Coastguard Worker method public void setTcpBufferSizes(@Nullable String); 184*344a7f5eSAndroid Build Coastguard Worker method public void setUsePrivateDns(boolean); 185*344a7f5eSAndroid Build Coastguard Worker method public void setValidatedPrivateDnsServers(@NonNull java.util.Collection<java.net.InetAddress>); 186*344a7f5eSAndroid Build Coastguard Worker } 187*344a7f5eSAndroid Build Coastguard Worker 188*344a7f5eSAndroid Build Coastguard Worker public final class NattKeepalivePacketData extends android.net.KeepalivePacketData implements android.os.Parcelable { 189*344a7f5eSAndroid Build Coastguard Worker ctor public NattKeepalivePacketData(@NonNull java.net.InetAddress, int, @NonNull java.net.InetAddress, int, @NonNull byte[]) throws android.net.InvalidPacketException; 190*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 191*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 192*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.NattKeepalivePacketData> CREATOR; 193*344a7f5eSAndroid Build Coastguard Worker } 194*344a7f5eSAndroid Build Coastguard Worker 195*344a7f5eSAndroid Build Coastguard Worker public class Network implements android.os.Parcelable { 196*344a7f5eSAndroid Build Coastguard Worker ctor public Network(@NonNull android.net.Network); 197*344a7f5eSAndroid Build Coastguard Worker method public int getNetId(); 198*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.Network getPrivateDnsBypassingCopy(); 199*344a7f5eSAndroid Build Coastguard Worker } 200*344a7f5eSAndroid Build Coastguard Worker 201*344a7f5eSAndroid Build Coastguard Worker public abstract class NetworkAgent { 202*344a7f5eSAndroid Build Coastguard Worker ctor public NetworkAgent(@NonNull android.content.Context, @NonNull android.os.Looper, @NonNull String, @NonNull android.net.NetworkCapabilities, @NonNull android.net.LinkProperties, int, @NonNull android.net.NetworkAgentConfig, @Nullable android.net.NetworkProvider); 203*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.Network getNetwork(); 204*344a7f5eSAndroid Build Coastguard Worker method public void markConnected(); 205*344a7f5eSAndroid Build Coastguard Worker method public void onAddKeepalivePacketFilter(int, @NonNull android.net.KeepalivePacketData); 206*344a7f5eSAndroid Build Coastguard Worker method public void onAutomaticReconnectDisabled(); 207*344a7f5eSAndroid Build Coastguard Worker method public void onNetworkUnwanted(); 208*344a7f5eSAndroid Build Coastguard Worker method public void onRemoveKeepalivePacketFilter(int); 209*344a7f5eSAndroid Build Coastguard Worker method public void onSaveAcceptUnvalidated(boolean); 210*344a7f5eSAndroid Build Coastguard Worker method public void onSignalStrengthThresholdsUpdated(@NonNull int[]); 211*344a7f5eSAndroid Build Coastguard Worker method public void onStartSocketKeepalive(int, @NonNull java.time.Duration, @NonNull android.net.KeepalivePacketData); 212*344a7f5eSAndroid Build Coastguard Worker method public void onStopSocketKeepalive(int); 213*344a7f5eSAndroid Build Coastguard Worker method public void onValidationStatus(int, @Nullable android.net.Uri); 214*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.Network register(); 215*344a7f5eSAndroid Build Coastguard Worker method public final void sendLinkProperties(@NonNull android.net.LinkProperties); 216*344a7f5eSAndroid Build Coastguard Worker method public final void sendNetworkCapabilities(@NonNull android.net.NetworkCapabilities); 217*344a7f5eSAndroid Build Coastguard Worker method public final void sendNetworkScore(@IntRange(from=0, to=99) int); 218*344a7f5eSAndroid Build Coastguard Worker method public final void sendSocketKeepaliveEvent(int, int); 219*344a7f5eSAndroid Build Coastguard Worker method public void unregister(); 220*344a7f5eSAndroid Build Coastguard Worker field public static final int VALIDATION_STATUS_NOT_VALID = 2; // 0x2 221*344a7f5eSAndroid Build Coastguard Worker field public static final int VALIDATION_STATUS_VALID = 1; // 0x1 222*344a7f5eSAndroid Build Coastguard Worker } 223*344a7f5eSAndroid Build Coastguard Worker 224*344a7f5eSAndroid Build Coastguard Worker public final class NetworkAgentConfig implements android.os.Parcelable { 225*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 226*344a7f5eSAndroid Build Coastguard Worker method public int getLegacyType(); 227*344a7f5eSAndroid Build Coastguard Worker method @NonNull public String getLegacyTypeName(); 228*344a7f5eSAndroid Build Coastguard Worker method public boolean isExplicitlySelected(); 229*344a7f5eSAndroid Build Coastguard Worker method public boolean isPartialConnectivityAcceptable(); 230*344a7f5eSAndroid Build Coastguard Worker method public boolean isUnvalidatedConnectivityAcceptable(); 231*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 232*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkAgentConfig> CREATOR; 233*344a7f5eSAndroid Build Coastguard Worker } 234*344a7f5eSAndroid Build Coastguard Worker 235*344a7f5eSAndroid Build Coastguard Worker public static final class NetworkAgentConfig.Builder { 236*344a7f5eSAndroid Build Coastguard Worker ctor public NetworkAgentConfig.Builder(); 237*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkAgentConfig build(); 238*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkAgentConfig.Builder setExplicitlySelected(boolean); 239*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyType(int); 240*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyTypeName(@NonNull String); 241*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkAgentConfig.Builder setPartialConnectivityAcceptable(boolean); 242*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkAgentConfig.Builder setUnvalidatedConnectivityAcceptable(boolean); 243*344a7f5eSAndroid Build Coastguard Worker } 244*344a7f5eSAndroid Build Coastguard Worker 245*344a7f5eSAndroid Build Coastguard Worker public final class NetworkCapabilities implements android.os.Parcelable { 246*344a7f5eSAndroid Build Coastguard Worker method @NonNull public int[] getAdministratorUids(); 247*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getSsid(); 248*344a7f5eSAndroid Build Coastguard Worker method @NonNull public int[] getTransportTypes(); 249*344a7f5eSAndroid Build Coastguard Worker method public boolean satisfiedByNetworkCapabilities(@Nullable android.net.NetworkCapabilities); 250*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_OEM_PAID = 22; // 0x16 251*344a7f5eSAndroid Build Coastguard Worker field public static final int NET_CAPABILITY_PARTIAL_CONNECTIVITY = 24; // 0x18 252*344a7f5eSAndroid Build Coastguard Worker } 253*344a7f5eSAndroid Build Coastguard Worker 254*344a7f5eSAndroid Build Coastguard Worker public static final class NetworkCapabilities.Builder { 255*344a7f5eSAndroid Build Coastguard Worker ctor public NetworkCapabilities.Builder(); 256*344a7f5eSAndroid Build Coastguard Worker ctor public NetworkCapabilities.Builder(@NonNull android.net.NetworkCapabilities); 257*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkCapabilities.Builder addCapability(int); 258*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkCapabilities.Builder addTransportType(int); 259*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkCapabilities build(); 260*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkCapabilities.Builder removeCapability(int); 261*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkCapabilities.Builder removeTransportType(int); 262*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setAdministratorUids(@NonNull int[]); 263*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkCapabilities.Builder setLinkDownstreamBandwidthKbps(int); 264*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkCapabilities.Builder setLinkUpstreamBandwidthKbps(int); 265*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkCapabilities.Builder setNetworkSpecifier(@Nullable android.net.NetworkSpecifier); 266*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setOwnerUid(int); 267*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setRequestorPackageName(@Nullable String); 268*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setRequestorUid(int); 269*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP) public android.net.NetworkCapabilities.Builder setSignalStrength(int); 270*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setSsid(@Nullable String); 271*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.NetworkCapabilities.Builder setTransportInfo(@Nullable android.net.TransportInfo); 272*344a7f5eSAndroid Build Coastguard Worker } 273*344a7f5eSAndroid Build Coastguard Worker 274*344a7f5eSAndroid Build Coastguard Worker public class NetworkProvider { 275*344a7f5eSAndroid Build Coastguard Worker ctor public NetworkProvider(@NonNull android.content.Context, @NonNull android.os.Looper, @NonNull String); 276*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public void declareNetworkRequestUnfulfillable(@NonNull android.net.NetworkRequest); 277*344a7f5eSAndroid Build Coastguard Worker method public int getProviderId(); 278*344a7f5eSAndroid Build Coastguard Worker method public void onNetworkRequestWithdrawn(@NonNull android.net.NetworkRequest); 279*344a7f5eSAndroid Build Coastguard Worker method public void onNetworkRequested(@NonNull android.net.NetworkRequest, @IntRange(from=0, to=99) int, int); 280*344a7f5eSAndroid Build Coastguard Worker field public static final int ID_NONE = -1; // 0xffffffff 281*344a7f5eSAndroid Build Coastguard Worker } 282*344a7f5eSAndroid Build Coastguard Worker 283*344a7f5eSAndroid Build Coastguard Worker public class NetworkRequest implements android.os.Parcelable { 284*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getRequestorPackageName(); 285*344a7f5eSAndroid Build Coastguard Worker method public int getRequestorUid(); 286*344a7f5eSAndroid Build Coastguard Worker } 287*344a7f5eSAndroid Build Coastguard Worker 288*344a7f5eSAndroid Build Coastguard Worker public static class NetworkRequest.Builder { 289*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP) public android.net.NetworkRequest.Builder setSignalStrength(int); 290*344a7f5eSAndroid Build Coastguard Worker } 291*344a7f5eSAndroid Build Coastguard Worker 292*344a7f5eSAndroid Build Coastguard Worker public final class RouteInfo implements android.os.Parcelable { 293*344a7f5eSAndroid Build Coastguard Worker ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int); 294*344a7f5eSAndroid Build Coastguard Worker ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int, int); 295*344a7f5eSAndroid Build Coastguard Worker method public int getMtu(); 296*344a7f5eSAndroid Build Coastguard Worker method public int getType(); 297*344a7f5eSAndroid Build Coastguard Worker field public static final int RTN_THROW = 9; // 0x9 298*344a7f5eSAndroid Build Coastguard Worker field public static final int RTN_UNICAST = 1; // 0x1 299*344a7f5eSAndroid Build Coastguard Worker field public static final int RTN_UNREACHABLE = 7; // 0x7 300*344a7f5eSAndroid Build Coastguard Worker } 301*344a7f5eSAndroid Build Coastguard Worker 302*344a7f5eSAndroid Build Coastguard Worker public abstract class SocketKeepalive implements java.lang.AutoCloseable { 303*344a7f5eSAndroid Build Coastguard Worker field public static final int SUCCESS = 0; // 0x0 304*344a7f5eSAndroid Build Coastguard Worker } 305*344a7f5eSAndroid Build Coastguard Worker 306*344a7f5eSAndroid Build Coastguard Worker public final class StaticIpConfiguration implements android.os.Parcelable { 307*344a7f5eSAndroid Build Coastguard Worker ctor public StaticIpConfiguration(); 308*344a7f5eSAndroid Build Coastguard Worker ctor public StaticIpConfiguration(@Nullable android.net.StaticIpConfiguration); 309*344a7f5eSAndroid Build Coastguard Worker method public void addDnsServer(@NonNull java.net.InetAddress); 310*344a7f5eSAndroid Build Coastguard Worker method public void clear(); 311*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 312*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<java.net.InetAddress> getDnsServers(); 313*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getDomains(); 314*344a7f5eSAndroid Build Coastguard Worker method @Nullable public java.net.InetAddress getGateway(); 315*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.net.LinkAddress getIpAddress(); 316*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.net.RouteInfo> getRoutes(@Nullable String); 317*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 318*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.net.StaticIpConfiguration> CREATOR; 319*344a7f5eSAndroid Build Coastguard Worker } 320*344a7f5eSAndroid Build Coastguard Worker 321*344a7f5eSAndroid Build Coastguard Worker public static final class StaticIpConfiguration.Builder { 322*344a7f5eSAndroid Build Coastguard Worker ctor public StaticIpConfiguration.Builder(); 323*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.StaticIpConfiguration build(); 324*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.StaticIpConfiguration.Builder setDnsServers(@NonNull Iterable<java.net.InetAddress>); 325*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.StaticIpConfiguration.Builder setDomains(@Nullable String); 326*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.StaticIpConfiguration.Builder setGateway(@Nullable java.net.InetAddress); 327*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.net.StaticIpConfiguration.Builder setIpAddress(@Nullable android.net.LinkAddress); 328*344a7f5eSAndroid Build Coastguard Worker } 329*344a7f5eSAndroid Build Coastguard Worker 330*344a7f5eSAndroid Build Coastguard Worker} 331*344a7f5eSAndroid Build Coastguard Worker 332*344a7f5eSAndroid Build Coastguard Workerpackage android.net.apf { 333*344a7f5eSAndroid Build Coastguard Worker 334*344a7f5eSAndroid Build Coastguard Worker public final class ApfCapabilities implements android.os.Parcelable { 335*344a7f5eSAndroid Build Coastguard Worker ctor public ApfCapabilities(int, int, int); 336*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 337*344a7f5eSAndroid Build Coastguard Worker method public static boolean getApfDrop8023Frames(); 338*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static int[] getApfEtherTypeBlackList(); 339*344a7f5eSAndroid Build Coastguard Worker method public boolean hasDataAccess(); 340*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 341*344a7f5eSAndroid Build Coastguard Worker field public static final android.os.Parcelable.Creator<android.net.apf.ApfCapabilities> CREATOR; 342*344a7f5eSAndroid Build Coastguard Worker field public final int apfPacketFormat; 343*344a7f5eSAndroid Build Coastguard Worker field public final int apfVersionSupported; 344*344a7f5eSAndroid Build Coastguard Worker field public final int maximumApfProgramSize; 345*344a7f5eSAndroid Build Coastguard Worker } 346*344a7f5eSAndroid Build Coastguard Worker 347*344a7f5eSAndroid Build Coastguard Worker} 348*344a7f5eSAndroid Build Coastguard Worker 349