blob: 251e5e846a2d8e43e60095de8a6b11aaf1fb378d [file] [log] [blame]
Remi NGUYEN VANbe179102021-01-28 13:37:03 +09001// Signature format: 2.0
2package android.net {
3
4 public class CaptivePortal implements android.os.Parcelable {
lifra9f55512021-03-02 17:12:27 +08005 method @Deprecated public void logEvent(int, @NonNull String);
Remi NGUYEN VANbe179102021-01-28 13:37:03 +09006 method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void reevaluateNetwork();
7 method public void useNetwork();
8 field public static final int APP_REQUEST_REEVALUATION_REQUIRED = 100; // 0x64
9 field public static final int APP_RETURN_DISMISSED = 0; // 0x0
10 field public static final int APP_RETURN_UNWANTED = 1; // 0x1
11 field public static final int APP_RETURN_WANTED_AS_IS = 2; // 0x2
12 }
13
14 public final class CaptivePortalData implements android.os.Parcelable {
15 method public int describeContents();
16 method public long getByteLimit();
17 method public long getExpiryTimeMillis();
18 method public long getRefreshTimeMillis();
19 method @Nullable public android.net.Uri getUserPortalUrl();
20 method public int getUserPortalUrlSource();
Hai Shalom871ba422021-03-16 20:59:42 -070021 method @Nullable public CharSequence getVenueFriendlyName();
Remi NGUYEN VANbe179102021-01-28 13:37:03 +090022 method @Nullable public android.net.Uri getVenueInfoUrl();
23 method public int getVenueInfoUrlSource();
24 method public boolean isCaptive();
25 method public boolean isSessionExtendable();
26 method public void writeToParcel(@NonNull android.os.Parcel, int);
27 field public static final int CAPTIVE_PORTAL_DATA_SOURCE_OTHER = 0; // 0x0
28 field public static final int CAPTIVE_PORTAL_DATA_SOURCE_PASSPOINT = 1; // 0x1
29 field @NonNull public static final android.os.Parcelable.Creator<android.net.CaptivePortalData> CREATOR;
30 }
31
32 public static class CaptivePortalData.Builder {
33 ctor public CaptivePortalData.Builder();
34 ctor public CaptivePortalData.Builder(@Nullable android.net.CaptivePortalData);
35 method @NonNull public android.net.CaptivePortalData build();
36 method @NonNull public android.net.CaptivePortalData.Builder setBytesRemaining(long);
37 method @NonNull public android.net.CaptivePortalData.Builder setCaptive(boolean);
38 method @NonNull public android.net.CaptivePortalData.Builder setExpiryTime(long);
39 method @NonNull public android.net.CaptivePortalData.Builder setRefreshTime(long);
40 method @NonNull public android.net.CaptivePortalData.Builder setSessionExtendable(boolean);
41 method @NonNull public android.net.CaptivePortalData.Builder setUserPortalUrl(@Nullable android.net.Uri);
42 method @NonNull public android.net.CaptivePortalData.Builder setUserPortalUrl(@Nullable android.net.Uri, int);
Hai Shalom871ba422021-03-16 20:59:42 -070043 method @NonNull public android.net.CaptivePortalData.Builder setVenueFriendlyName(@Nullable CharSequence);
Remi NGUYEN VANbe179102021-01-28 13:37:03 +090044 method @NonNull public android.net.CaptivePortalData.Builder setVenueInfoUrl(@Nullable android.net.Uri);
45 method @NonNull public android.net.CaptivePortalData.Builder setVenueInfoUrl(@Nullable android.net.Uri, int);
46 }
47
48 public class ConnectivityManager {
49 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);
50 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);
51 method @Deprecated @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String getCaptivePortalServerUrl();
52 method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void getLatestTetheringEntitlementResult(int, boolean, @NonNull java.util.concurrent.Executor, @NonNull android.net.ConnectivityManager.OnTetheringEntitlementResultListener);
53 method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.WRITE_SETTINGS}) public boolean isTetheringSupported();
54 method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_FACTORY}) public int registerNetworkProvider(@NonNull android.net.NetworkProvider);
Daniel Bright7ee5f522021-03-10 11:51:50 -080055 method public void registerQosCallback(@NonNull android.net.QosSocketInfo, @NonNull java.util.concurrent.Executor, @NonNull android.net.QosCallback);
Remi NGUYEN VANbe179102021-01-28 13:37:03 +090056 method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void registerTetheringEventCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.ConnectivityManager.OnTetheringEventCallback);
57 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);
58 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);
Chalard Jean6010c002021-03-03 16:37:13 +090059 method @RequiresPermission(android.Manifest.permission.CONTROL_OEM_PAID_NETWORK_PREFERENCE) public void setOemNetworkPreference(@NonNull android.net.OemNetworkPreferences, @Nullable java.util.concurrent.Executor, @Nullable Runnable);
Remi NGUYEN VANbe179102021-01-28 13:37:03 +090060 method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public boolean shouldAvoidBadWifi();
61 method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public void startCaptivePortalApp(@NonNull android.net.Network, @NonNull android.os.Bundle);
62 method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void startTethering(int, boolean, android.net.ConnectivityManager.OnStartTetheringCallback);
63 method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void startTethering(int, boolean, android.net.ConnectivityManager.OnStartTetheringCallback, android.os.Handler);
64 method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void stopTethering(int);
65 method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_FACTORY}) public void unregisterNetworkProvider(@NonNull android.net.NetworkProvider);
66 method public void unregisterQosCallback(@NonNull android.net.QosCallback);
67 method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void unregisterTetheringEventCallback(@NonNull android.net.ConnectivityManager.OnTetheringEventCallback);
68 field public static final String EXTRA_CAPTIVE_PORTAL_PROBE_SPEC = "android.net.extra.CAPTIVE_PORTAL_PROBE_SPEC";
69 field public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT = "android.net.extra.CAPTIVE_PORTAL_USER_AGENT";
70 field public static final int TETHERING_BLUETOOTH = 2; // 0x2
71 field public static final int TETHERING_USB = 1; // 0x1
72 field public static final int TETHERING_WIFI = 0; // 0x0
73 field @Deprecated public static final int TETHER_ERROR_ENTITLEMENT_UNKONWN = 13; // 0xd
74 field @Deprecated public static final int TETHER_ERROR_NO_ERROR = 0; // 0x0
75 field @Deprecated public static final int TETHER_ERROR_PROVISION_FAILED = 11; // 0xb
76 field public static final int TYPE_NONE = -1; // 0xffffffff
77 field @Deprecated public static final int TYPE_PROXY = 16; // 0x10
78 field @Deprecated public static final int TYPE_WIFI_P2P = 13; // 0xd
79 }
80
Remi NGUYEN VANbe179102021-01-28 13:37:03 +090081 @Deprecated public abstract static class ConnectivityManager.OnStartTetheringCallback {
82 ctor @Deprecated public ConnectivityManager.OnStartTetheringCallback();
83 method @Deprecated public void onTetheringFailed();
84 method @Deprecated public void onTetheringStarted();
85 }
86
87 @Deprecated public static interface ConnectivityManager.OnTetheringEntitlementResultListener {
88 method @Deprecated public void onTetheringEntitlementResult(int);
89 }
90
91 @Deprecated public abstract static class ConnectivityManager.OnTetheringEventCallback {
92 ctor @Deprecated public ConnectivityManager.OnTetheringEventCallback();
93 method @Deprecated public void onUpstreamChanged(@Nullable android.net.Network);
94 }
95
96 public final class InvalidPacketException extends java.lang.Exception {
97 ctor public InvalidPacketException(int);
98 method public int getError();
99 field public static final int ERROR_INVALID_IP_ADDRESS = -21; // 0xffffffeb
100 field public static final int ERROR_INVALID_LENGTH = -23; // 0xffffffe9
101 field public static final int ERROR_INVALID_PORT = -22; // 0xffffffea
102 }
103
104 public final class IpConfiguration implements android.os.Parcelable {
105 ctor public IpConfiguration();
106 ctor public IpConfiguration(@NonNull android.net.IpConfiguration);
107 method public int describeContents();
108 method @Nullable public android.net.ProxyInfo getHttpProxy();
109 method @NonNull public android.net.IpConfiguration.IpAssignment getIpAssignment();
110 method @NonNull public android.net.IpConfiguration.ProxySettings getProxySettings();
111 method @Nullable public android.net.StaticIpConfiguration getStaticIpConfiguration();
112 method public void setHttpProxy(@Nullable android.net.ProxyInfo);
113 method public void setIpAssignment(@NonNull android.net.IpConfiguration.IpAssignment);
114 method public void setProxySettings(@NonNull android.net.IpConfiguration.ProxySettings);
115 method public void setStaticIpConfiguration(@Nullable android.net.StaticIpConfiguration);
116 method public void writeToParcel(@NonNull android.os.Parcel, int);
117 field @NonNull public static final android.os.Parcelable.Creator<android.net.IpConfiguration> CREATOR;
118 }
119
120 public enum IpConfiguration.IpAssignment {
121 enum_constant public static final android.net.IpConfiguration.IpAssignment DHCP;
122 enum_constant public static final android.net.IpConfiguration.IpAssignment STATIC;
123 enum_constant public static final android.net.IpConfiguration.IpAssignment UNASSIGNED;
124 }
125
126 public enum IpConfiguration.ProxySettings {
127 enum_constant public static final android.net.IpConfiguration.ProxySettings NONE;
128 enum_constant public static final android.net.IpConfiguration.ProxySettings PAC;
129 enum_constant public static final android.net.IpConfiguration.ProxySettings STATIC;
130 enum_constant public static final android.net.IpConfiguration.ProxySettings UNASSIGNED;
131 }
132
133 public final class IpPrefix implements android.os.Parcelable {
134 ctor public IpPrefix(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int);
135 ctor public IpPrefix(@NonNull String);
136 }
137
138 public class KeepalivePacketData {
139 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;
140 method @NonNull public java.net.InetAddress getDstAddress();
141 method public int getDstPort();
142 method @NonNull public byte[] getPacket();
143 method @NonNull public java.net.InetAddress getSrcAddress();
144 method public int getSrcPort();
145 }
146
147 public class LinkAddress implements android.os.Parcelable {
148 ctor public LinkAddress(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int, int, int);
149 ctor public LinkAddress(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int, int, int, long, long);
150 ctor public LinkAddress(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int);
151 ctor public LinkAddress(@NonNull String);
152 ctor public LinkAddress(@NonNull String, int, int);
153 method public long getDeprecationTime();
154 method public long getExpirationTime();
155 method public boolean isGlobalPreferred();
156 method public boolean isIpv4();
157 method public boolean isIpv6();
158 method public boolean isSameAddressAs(@Nullable android.net.LinkAddress);
159 field public static final long LIFETIME_PERMANENT = 9223372036854775807L; // 0x7fffffffffffffffL
160 field public static final long LIFETIME_UNKNOWN = -1L; // 0xffffffffffffffffL
161 }
162
163 public final class LinkProperties implements android.os.Parcelable {
164 ctor public LinkProperties(@Nullable android.net.LinkProperties);
165 ctor public LinkProperties(@Nullable android.net.LinkProperties, boolean);
166 method public boolean addDnsServer(@NonNull java.net.InetAddress);
167 method public boolean addLinkAddress(@NonNull android.net.LinkAddress);
168 method public boolean addPcscfServer(@NonNull java.net.InetAddress);
169 method @NonNull public java.util.List<java.net.InetAddress> getAddresses();
170 method @NonNull public java.util.List<java.lang.String> getAllInterfaceNames();
171 method @NonNull public java.util.List<android.net.LinkAddress> getAllLinkAddresses();
172 method @NonNull public java.util.List<android.net.RouteInfo> getAllRoutes();
173 method @Nullable public android.net.Uri getCaptivePortalApiUrl();
174 method @Nullable public android.net.CaptivePortalData getCaptivePortalData();
175 method @NonNull public java.util.List<java.net.InetAddress> getPcscfServers();
176 method @Nullable public String getTcpBufferSizes();
177 method @NonNull public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers();
178 method public boolean hasGlobalIpv6Address();
179 method public boolean hasIpv4Address();
180 method public boolean hasIpv4DefaultRoute();
181 method public boolean hasIpv4DnsServer();
182 method public boolean hasIpv6DefaultRoute();
183 method public boolean hasIpv6DnsServer();
184 method public boolean isIpv4Provisioned();
185 method public boolean isIpv6Provisioned();
186 method public boolean isProvisioned();
187 method public boolean isReachable(@NonNull java.net.InetAddress);
188 method public boolean removeDnsServer(@NonNull java.net.InetAddress);
189 method public boolean removeLinkAddress(@NonNull android.net.LinkAddress);
190 method public boolean removeRoute(@NonNull android.net.RouteInfo);
191 method public void setCaptivePortalApiUrl(@Nullable android.net.Uri);
192 method public void setCaptivePortalData(@Nullable android.net.CaptivePortalData);
193 method public void setPcscfServers(@NonNull java.util.Collection<java.net.InetAddress>);
194 method public void setPrivateDnsServerName(@Nullable String);
195 method public void setTcpBufferSizes(@Nullable String);
196 method public void setUsePrivateDns(boolean);
197 method public void setValidatedPrivateDnsServers(@NonNull java.util.Collection<java.net.InetAddress>);
198 }
199
200 public final class NattKeepalivePacketData extends android.net.KeepalivePacketData implements android.os.Parcelable {
201 ctor public NattKeepalivePacketData(@NonNull java.net.InetAddress, int, @NonNull java.net.InetAddress, int, @NonNull byte[]) throws android.net.InvalidPacketException;
202 method public int describeContents();
203 method public void writeToParcel(@NonNull android.os.Parcel, int);
204 field @NonNull public static final android.os.Parcelable.Creator<android.net.NattKeepalivePacketData> CREATOR;
205 }
206
207 public class Network implements android.os.Parcelable {
208 ctor public Network(@NonNull android.net.Network);
209 method public int getNetId();
210 method @NonNull public android.net.Network getPrivateDnsBypassingCopy();
211 }
212
213 public abstract class NetworkAgent {
214 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);
Chiachang Wang2ae2d152021-03-23 16:12:44 +0800215 ctor public NetworkAgent(@NonNull android.content.Context, @NonNull android.os.Looper, @NonNull String, @NonNull android.net.NetworkCapabilities, @NonNull android.net.LinkProperties, @NonNull android.net.NetworkScore, @NonNull android.net.NetworkAgentConfig, @Nullable android.net.NetworkProvider);
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900216 method @Nullable public android.net.Network getNetwork();
217 method public void markConnected();
218 method public void onAddKeepalivePacketFilter(int, @NonNull android.net.KeepalivePacketData);
219 method public void onAutomaticReconnectDisabled();
lifr75764c82021-03-18 01:11:30 +0800220 method public void onBandwidthUpdateRequested();
Chiachang Wang3f6cc072021-03-24 18:39:17 +0800221 method public void onNetworkCreated();
Lorenzo Colittid5385c42021-03-11 01:32:09 +0900222 method public void onNetworkDestroyed();
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900223 method public void onNetworkUnwanted();
224 method public void onQosCallbackRegistered(int, @NonNull android.net.QosFilter);
225 method public void onQosCallbackUnregistered(int);
226 method public void onRemoveKeepalivePacketFilter(int);
227 method public void onSaveAcceptUnvalidated(boolean);
228 method public void onSignalStrengthThresholdsUpdated(@NonNull int[]);
229 method public void onStartSocketKeepalive(int, @NonNull java.time.Duration, @NonNull android.net.KeepalivePacketData);
230 method public void onStopSocketKeepalive(int);
231 method public void onValidationStatus(int, @Nullable android.net.Uri);
232 method @NonNull public android.net.Network register();
233 method public final void sendLinkProperties(@NonNull android.net.LinkProperties);
234 method public final void sendNetworkCapabilities(@NonNull android.net.NetworkCapabilities);
235 method public final void sendNetworkScore(@IntRange(from=0, to=99) int);
236 method public final void sendQosCallbackError(int, int);
Jayachandran C6cdedae2021-03-15 15:58:11 -0700237 method public final void sendQosSessionAvailable(int, int, @NonNull android.net.QosSessionAttributes);
238 method public final void sendQosSessionLost(int, int, int);
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900239 method public final void sendSocketKeepaliveEvent(int, int);
lifr75764c82021-03-18 01:11:30 +0800240 method @Deprecated public void setLegacySubtype(int, @NonNull String);
Lorenzo Colittid5385c42021-03-11 01:32:09 +0900241 method public void setTeardownDelayMs(@IntRange(from=0, to=0x1388) int);
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900242 method public final void setUnderlyingNetworks(@Nullable java.util.List<android.net.Network>);
243 method public void unregister();
244 field public static final int VALIDATION_STATUS_NOT_VALID = 2; // 0x2
245 field public static final int VALIDATION_STATUS_VALID = 1; // 0x1
246 }
247
248 public final class NetworkAgentConfig implements android.os.Parcelable {
249 method public int describeContents();
250 method public int getLegacyType();
251 method @NonNull public String getLegacyTypeName();
252 method public boolean isExplicitlySelected();
253 method public boolean isPartialConnectivityAcceptable();
254 method public boolean isUnvalidatedConnectivityAcceptable();
255 method public void writeToParcel(@NonNull android.os.Parcel, int);
256 field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkAgentConfig> CREATOR;
257 }
258
259 public static final class NetworkAgentConfig.Builder {
260 ctor public NetworkAgentConfig.Builder();
261 method @NonNull public android.net.NetworkAgentConfig build();
lifr75764c82021-03-18 01:11:30 +0800262 method @NonNull public android.net.NetworkAgentConfig.Builder disableNat64Detection();
263 method @NonNull public android.net.NetworkAgentConfig.Builder disableProvisioningNotification();
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900264 method @NonNull public android.net.NetworkAgentConfig.Builder setExplicitlySelected(boolean);
lifr75764c82021-03-18 01:11:30 +0800265 method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyExtraInfo(@NonNull String);
266 method @NonNull public android.net.NetworkAgentConfig.Builder setLegacySubType(int);
267 method @NonNull public android.net.NetworkAgentConfig.Builder setLegacySubTypeName(@NonNull String);
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900268 method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyType(int);
269 method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyTypeName(@NonNull String);
270 method @NonNull public android.net.NetworkAgentConfig.Builder setPartialConnectivityAcceptable(boolean);
271 method @NonNull public android.net.NetworkAgentConfig.Builder setUnvalidatedConnectivityAcceptable(boolean);
272 }
273
274 public final class NetworkCapabilities implements android.os.Parcelable {
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900275 method @NonNull public int[] getAdministratorUids();
276 method @Nullable public String getSsid();
Benedict Wong53de25f2021-03-24 14:01:51 -0700277 method @NonNull public java.util.Set<java.lang.Integer> getSubIds();
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900278 method @NonNull public int[] getTransportTypes();
279 method public boolean isPrivateDnsBroken();
280 method public boolean satisfiedByNetworkCapabilities(@Nullable android.net.NetworkCapabilities);
Chiachang Wangcbb5e0e2021-03-25 14:28:15 +0800281 field public static final int NET_CAPABILITY_BIP = 31; // 0x1f
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900282 field public static final int NET_CAPABILITY_NOT_VCN_MANAGED = 28; // 0x1c
283 field public static final int NET_CAPABILITY_OEM_PAID = 22; // 0x16
284 field public static final int NET_CAPABILITY_OEM_PRIVATE = 26; // 0x1a
285 field public static final int NET_CAPABILITY_PARTIAL_CONNECTIVITY = 24; // 0x18
286 field public static final int NET_CAPABILITY_VEHICLE_INTERNAL = 27; // 0x1b
Chiachang Wangcbb5e0e2021-03-25 14:28:15 +0800287 field public static final int NET_CAPABILITY_VSIM = 30; // 0x1e
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900288 }
289
290 public static final class NetworkCapabilities.Builder {
291 ctor public NetworkCapabilities.Builder();
292 ctor public NetworkCapabilities.Builder(@NonNull android.net.NetworkCapabilities);
293 method @NonNull public android.net.NetworkCapabilities.Builder addCapability(int);
294 method @NonNull public android.net.NetworkCapabilities.Builder addTransportType(int);
295 method @NonNull public android.net.NetworkCapabilities build();
296 method @NonNull public android.net.NetworkCapabilities.Builder clearAll();
297 method @NonNull public android.net.NetworkCapabilities.Builder removeCapability(int);
298 method @NonNull public android.net.NetworkCapabilities.Builder removeTransportType(int);
299 method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setAdministratorUids(@NonNull int[]);
300 method @NonNull public android.net.NetworkCapabilities.Builder setLinkDownstreamBandwidthKbps(int);
301 method @NonNull public android.net.NetworkCapabilities.Builder setLinkUpstreamBandwidthKbps(int);
302 method @NonNull public android.net.NetworkCapabilities.Builder setNetworkSpecifier(@Nullable android.net.NetworkSpecifier);
303 method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setOwnerUid(int);
304 method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setRequestorPackageName(@Nullable String);
305 method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setRequestorUid(int);
306 method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP) public android.net.NetworkCapabilities.Builder setSignalStrength(int);
307 method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setSsid(@Nullable String);
junyulaie53fbc02021-03-11 20:20:19 +0800308 method @NonNull public android.net.NetworkCapabilities.Builder setSubIds(@NonNull java.util.Set<java.lang.Integer>);
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900309 method @NonNull public android.net.NetworkCapabilities.Builder setTransportInfo(@Nullable android.net.TransportInfo);
310 }
311
312 public class NetworkProvider {
313 ctor public NetworkProvider(@NonNull android.content.Context, @NonNull android.os.Looper, @NonNull String);
314 method @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public void declareNetworkRequestUnfulfillable(@NonNull android.net.NetworkRequest);
315 method public int getProviderId();
316 method public void onNetworkRequestWithdrawn(@NonNull android.net.NetworkRequest);
317 method public void onNetworkRequested(@NonNull android.net.NetworkRequest, @IntRange(from=0, to=99) int, int);
318 field public static final int ID_NONE = -1; // 0xffffffff
319 }
320
Remi NGUYEN VANcb617012021-03-01 17:53:45 +0900321 public class NetworkReleasedException extends java.lang.Exception {
322 }
323
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900324 public class NetworkRequest implements android.os.Parcelable {
325 method @Nullable public String getRequestorPackageName();
326 method public int getRequestorUid();
327 }
328
329 public static class NetworkRequest.Builder {
330 method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP) public android.net.NetworkRequest.Builder setSignalStrength(int);
Benedict Wong53de25f2021-03-24 14:01:51 -0700331 method @NonNull public android.net.NetworkRequest.Builder setSubIds(@NonNull java.util.Set<java.lang.Integer>);
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900332 }
333
lucaslin9a2ee9e2021-03-23 16:17:37 +0800334 public final class NetworkScore implements android.os.Parcelable {
335 method public int describeContents();
336 method public int getLegacyInt();
337 method public void writeToParcel(@NonNull android.os.Parcel, int);
338 field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkScore> CREATOR;
339 }
340
341 public static final class NetworkScore.Builder {
342 ctor public NetworkScore.Builder();
343 method @NonNull public android.net.NetworkScore build();
344 method @NonNull public android.net.NetworkScore.Builder setLegacyInt(int);
345 }
346
Remi NGUYEN VAN69540222021-03-06 00:43:09 +0900347 public final class OemNetworkPreferences implements android.os.Parcelable {
348 method public int describeContents();
349 method @NonNull public java.util.Map<java.lang.String,java.lang.Integer> getNetworkPreferences();
350 method public void writeToParcel(@NonNull android.os.Parcel, int);
351 field @NonNull public static final android.os.Parcelable.Creator<android.net.OemNetworkPreferences> CREATOR;
352 field public static final int OEM_NETWORK_PREFERENCE_OEM_PAID = 1; // 0x1
353 field public static final int OEM_NETWORK_PREFERENCE_OEM_PAID_NO_FALLBACK = 2; // 0x2
354 field public static final int OEM_NETWORK_PREFERENCE_OEM_PAID_ONLY = 3; // 0x3
355 field public static final int OEM_NETWORK_PREFERENCE_OEM_PRIVATE_ONLY = 4; // 0x4
356 field public static final int OEM_NETWORK_PREFERENCE_UNINITIALIZED = 0; // 0x0
357 }
358
359 public static final class OemNetworkPreferences.Builder {
360 ctor public OemNetworkPreferences.Builder();
361 ctor public OemNetworkPreferences.Builder(@NonNull android.net.OemNetworkPreferences);
362 method @NonNull public android.net.OemNetworkPreferences.Builder addNetworkPreference(@NonNull String, int);
363 method @NonNull public android.net.OemNetworkPreferences build();
364 method @NonNull public android.net.OemNetworkPreferences.Builder clearNetworkPreference(@NonNull String);
365 }
366
Remi NGUYEN VANcb617012021-03-01 17:53:45 +0900367 public abstract class QosCallback {
368 ctor public QosCallback();
369 method public void onError(@NonNull android.net.QosCallbackException);
370 method public void onQosSessionAvailable(@NonNull android.net.QosSession, @NonNull android.net.QosSessionAttributes);
371 method public void onQosSessionLost(@NonNull android.net.QosSession);
372 }
373
374 public static class QosCallback.QosCallbackRegistrationException extends java.lang.RuntimeException {
375 }
376
377 public final class QosCallbackException extends java.lang.Exception {
378 }
379
380 public abstract class QosFilter {
381 method @NonNull public abstract android.net.Network getNetwork();
382 method public abstract boolean matchesLocalAddress(@NonNull java.net.InetAddress, int, int);
383 }
384
385 public final class QosSession implements android.os.Parcelable {
386 ctor public QosSession(int, int);
387 method public int describeContents();
388 method public int getSessionId();
389 method public int getSessionType();
390 method public long getUniqueId();
391 method public void writeToParcel(@NonNull android.os.Parcel, int);
392 field @NonNull public static final android.os.Parcelable.Creator<android.net.QosSession> CREATOR;
393 field public static final int TYPE_EPS_BEARER = 1; // 0x1
Jayachandran C6cdedae2021-03-15 15:58:11 -0700394 field public static final int TYPE_NR_BEARER = 2; // 0x2
Remi NGUYEN VANcb617012021-03-01 17:53:45 +0900395 }
396
397 public interface QosSessionAttributes {
398 }
399
400 public final class QosSocketInfo implements android.os.Parcelable {
401 ctor public QosSocketInfo(@NonNull android.net.Network, @NonNull java.net.Socket) throws java.io.IOException;
402 method public int describeContents();
403 method @NonNull public java.net.InetSocketAddress getLocalSocketAddress();
404 method @NonNull public android.net.Network getNetwork();
405 method public void writeToParcel(@NonNull android.os.Parcel, int);
406 field @NonNull public static final android.os.Parcelable.Creator<android.net.QosSocketInfo> CREATOR;
407 }
408
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900409 public final class RouteInfo implements android.os.Parcelable {
410 ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int);
411 ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int, int);
412 method public int getMtu();
413 method public int getType();
414 field public static final int RTN_THROW = 9; // 0x9
415 field public static final int RTN_UNICAST = 1; // 0x1
416 field public static final int RTN_UNREACHABLE = 7; // 0x7
417 }
418
419 public abstract class SocketKeepalive implements java.lang.AutoCloseable {
lifr75764c82021-03-18 01:11:30 +0800420 field public static final int ERROR_NO_SUCH_SLOT = -33; // 0xffffffdf
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900421 field public static final int SUCCESS = 0; // 0x0
422 }
423
Remi NGUYEN VANcb617012021-03-01 17:53:45 +0900424 public class SocketLocalAddressChangedException extends java.lang.Exception {
425 }
426
427 public class SocketNotBoundException extends java.lang.Exception {
428 }
429
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900430 public final class StaticIpConfiguration implements android.os.Parcelable {
431 ctor public StaticIpConfiguration();
432 ctor public StaticIpConfiguration(@Nullable android.net.StaticIpConfiguration);
433 method public void addDnsServer(@NonNull java.net.InetAddress);
434 method public void clear();
435 method public int describeContents();
436 method @NonNull public java.util.List<java.net.InetAddress> getDnsServers();
437 method @Nullable public String getDomains();
438 method @Nullable public java.net.InetAddress getGateway();
439 method @Nullable public android.net.LinkAddress getIpAddress();
440 method @NonNull public java.util.List<android.net.RouteInfo> getRoutes(@Nullable String);
441 method public void writeToParcel(android.os.Parcel, int);
442 field @NonNull public static final android.os.Parcelable.Creator<android.net.StaticIpConfiguration> CREATOR;
443 }
444
445 public static final class StaticIpConfiguration.Builder {
446 ctor public StaticIpConfiguration.Builder();
447 method @NonNull public android.net.StaticIpConfiguration build();
448 method @NonNull public android.net.StaticIpConfiguration.Builder setDnsServers(@NonNull Iterable<java.net.InetAddress>);
449 method @NonNull public android.net.StaticIpConfiguration.Builder setDomains(@Nullable String);
450 method @NonNull public android.net.StaticIpConfiguration.Builder setGateway(@Nullable java.net.InetAddress);
451 method @NonNull public android.net.StaticIpConfiguration.Builder setIpAddress(@Nullable android.net.LinkAddress);
452 }
453
454 public final class TcpKeepalivePacketData extends android.net.KeepalivePacketData implements android.os.Parcelable {
455 ctor public TcpKeepalivePacketData(@NonNull java.net.InetAddress, int, @NonNull java.net.InetAddress, int, @NonNull byte[], int, int, int, int, int, int) throws android.net.InvalidPacketException;
456 method public int describeContents();
457 method public void writeToParcel(@NonNull android.os.Parcel, int);
458 field @NonNull public static final android.os.Parcelable.Creator<android.net.TcpKeepalivePacketData> CREATOR;
459 field public final int ipTos;
460 field public final int ipTtl;
461 field public final int tcpAck;
462 field public final int tcpSeq;
463 field public final int tcpWindow;
464 field public final int tcpWindowScale;
465 }
466
Remi NGUYEN VANbe179102021-01-28 13:37:03 +0900467}
468
469package android.net.apf {
470
471 public final class ApfCapabilities implements android.os.Parcelable {
472 ctor public ApfCapabilities(int, int, int);
473 method public int describeContents();
474 method public static boolean getApfDrop8023Frames();
475 method @NonNull public static int[] getApfEtherTypeBlackList();
476 method public boolean hasDataAccess();
477 method public void writeToParcel(android.os.Parcel, int);
478 field public static final android.os.Parcelable.Creator<android.net.apf.ApfCapabilities> CREATOR;
479 field public final int apfPacketFormat;
480 field public final int apfVersionSupported;
481 field public final int maximumApfProgramSize;
482 }
483
484}
485