/**@class android.net.NetworkCapabilities implements android.os.Parcelable @extends java.lang.Object Representation of the capabilities of an active network. Instances are typically obtained through {@link android.net.NetworkCallback#onCapabilitiesChanged(android.net.Network, android.net.NetworkCapabilities)} or {@link android.net.ConnectivityManager#getNetworkCapabilities(Network)}. <p> This replaces the old {@link android.net.ConnectivityManager#TYPE_MOBILE} method of network selection. Rather than indicate a need for Wi-Fi because an application needs high bandwidth and risk obsolescence when a new, fast network appears (like LTE), the application should specify it needs high bandwidth. Similarly if an application needs an unmetered network for a bulk transfer it can specify that rather than assuming all cellular based connections are metered and all Wi-Fi based connections are not. */ var NetworkCapabilities = { /** Indicates this is a network that has the ability to reach the carrier's MMSC for sending and receiving MMS messages. */ NET_CAPABILITY_MMS : "0", /** Indicates this is a network that has the ability to reach the carrier's SUPL server, used to retrieve GPS information. */ NET_CAPABILITY_SUPL : "1", /** Indicates this is a network that has the ability to reach the carrier's DUN or tethering gateway. */ NET_CAPABILITY_DUN : "2", /** Indicates this is a network that has the ability to reach the carrier's FOTA portal, used for over the air updates. */ NET_CAPABILITY_FOTA : "3", /** Indicates this is a network that has the ability to reach the carrier's IMS servers, used for network registration and signaling. */ NET_CAPABILITY_IMS : "4", /** Indicates this is a network that has the ability to reach the carrier's CBS servers, used for carrier specific services. */ NET_CAPABILITY_CBS : "5", /** Indicates this is a network that has the ability to reach a Wi-Fi direct peer. */ NET_CAPABILITY_WIFI_P2P : "6", /** Indicates this is a network that has the ability to reach a carrier's Initial Attach servers. */ NET_CAPABILITY_IA : "7", /** Indicates this is a network that has the ability to reach a carrier's RCS servers, used for Rich Communication Services. */ NET_CAPABILITY_RCS : "8", /** Indicates this is a network that has the ability to reach a carrier's XCAP servers, used for configuration and control. */ NET_CAPABILITY_XCAP : "9", /** Indicates this is a network that has the ability to reach a carrier's Emergency IMS servers or other services, used for network signaling during emergency calls. */ NET_CAPABILITY_EIMS : "10", /** Indicates that this network is unmetered. */ NET_CAPABILITY_NOT_METERED : "11", /** Indicates that this network should be able to reach the internet. */ NET_CAPABILITY_INTERNET : "12", /** Indicates that this network is available for general use. If this is not set applications should not attempt to communicate on this network. Note that this is simply informative and not enforcement - enforcement is handled via other means. Set by default. */ NET_CAPABILITY_NOT_RESTRICTED : "13", /** Indicates that the user has indicated implicit trust of this network. This generally means it's a sim-selected carrier, a plugged in ethernet, a paired BT device or a wifi the user asked to connect to. Untrusted networks are probably limited to unknown wifi AP. Set by default. */ NET_CAPABILITY_TRUSTED : "14", /** Indicates that this network is not a VPN. This capability is set by default and should be explicitly cleared for VPN networks. */ NET_CAPABILITY_NOT_VPN : "15", /** Indicates that connectivity on this network was successfully validated. For example, for a network with NET_CAPABILITY_INTERNET, it means that Internet connectivity was successfully detected. */ NET_CAPABILITY_VALIDATED : "16", /** Indicates that this network was found to have a captive portal in place last time it was probed. */ NET_CAPABILITY_CAPTIVE_PORTAL : "17", /** Indicates that this network is not roaming. */ NET_CAPABILITY_NOT_ROAMING : "18", /** Indicates that this network is available for use by apps, and not a network that is being kept up in the background to facilitate fast network switching. */ NET_CAPABILITY_FOREGROUND : "19", /** Indicates that this network is not congested. <p> When a network is congested, applications should defer network traffic that can be done at a later time, such as uploading analytics. */ NET_CAPABILITY_NOT_CONGESTED : "20", /** Indicates that this network is not currently suspended. <p> When a network is suspended, the network's IP addresses and any connections established on the network remain valid, but the network is temporarily unable to transfer data. This can happen, for example, if a cellular network experiences a temporary loss of signal, such as when driving through a tunnel, etc. A network with this capability is not suspended, so is expected to be able to transfer data. */ NET_CAPABILITY_NOT_SUSPENDED : "21", /** Indicates that traffic that goes through this network is paid by oem. For example, this network can be used by system apps to upload telemetry data. @hide */ NET_CAPABILITY_OEM_PAID : "22", /** Indicates this is a network that has the ability to reach a carrier's Mission Critical servers. */ NET_CAPABILITY_MCX : "23", /** Indicates that this network was tested to only provide partial connectivity. @hide */ NET_CAPABILITY_PARTIAL_CONNECTIVITY : "24", /** Indicates this network uses a Cellular transport. */ TRANSPORT_CELLULAR : "0", /** Indicates this network uses a Wi-Fi transport. */ TRANSPORT_WIFI : "1", /** Indicates this network uses a Bluetooth transport. */ TRANSPORT_BLUETOOTH : "2", /** Indicates this network uses an Ethernet transport. */ TRANSPORT_ETHERNET : "3", /** Indicates this network uses a VPN transport. */ TRANSPORT_VPN : "4", /** Indicates this network uses a Wi-Fi Aware transport. */ TRANSPORT_WIFI_AWARE : "5", /** Indicates this network uses a LoWPAN transport. */ TRANSPORT_LOWPAN : "6", /** Indicates this network uses a Test-only virtual interface as a transport. @hide */ TRANSPORT_TEST : "7", /**@hide */ MIN_TRANSPORT : "0", /**@hide */ MAX_TRANSPORT : "7", /** Value indicating that link bandwidth is unspecified. @hide */ LINK_BANDWIDTH_UNSPECIFIED : "0", /** Magic value that indicates no signal strength provided. A request specifying this value is always satisfied. */ SIGNAL_STRENGTH_UNSPECIFIED : "-2147483648", /***/ CREATOR : "null", /**Completely clears the contents of this object, removing even the capabilities that are set by default when the object is constructed. @hide */ clearAll : function( ) {}, /**Set all contents of this object to the contents of a NetworkCapabilities. @hide */ set : function( ) {}, /**Adds the given capability to this {@code NetworkCapability} instance. Multiple capabilities may be applied sequentially. Note that when searching for a network to satisfy a request, all capabilities requested must be satisfied. <p> If the given capability was previously added to the list of unwanted capabilities then the capability will also be removed from the list of unwanted capabilities. @param {Number} capability the capability to be added. @return {Object {android.net.NetworkCapabilities}} This NetworkCapabilities instance, to facilitate chaining. @hide */ addCapability : function( ) {}, /**Adds the given capability to the list of unwanted capabilities of this {@code NetworkCapability} instance. Multiple unwanted capabilities may be applied sequentially. Note that when searching for a network to satisfy a request, the network must not contain any capability from unwanted capability list. <p> If the capability was previously added to the list of required capabilities (for example, it was there by default or added using {@link #addCapability}(int) method), then it will be removed from the list of required capabilities as well. @see #addCapability(int) @hide */ addUnwantedCapability : function( ) {}, /**Removes (if found) the given capability from this {@code NetworkCapability} instance. <p> Note that this method removes capabilities that were added via {@link #addCapability}(int), {@link #addUnwantedCapability}(int) or {@link #setCapabilities(int[], int[])} . @param {Number} capability the capability to be removed. @return {Object {android.net.NetworkCapabilities}} This NetworkCapabilities instance, to facilitate chaining. @hide */ removeCapability : function( ) {}, /**Sets (or clears) the given capability on this {@link android.net.NetworkCapabilities} instance. @hide */ setCapability : function( ) {}, /**Gets all the capabilities set on this {@code NetworkCapability} instance. @return {Number} an array of capability values for this instance. @hide */ getCapabilities : function( ) {}, /**Gets all the unwanted capabilities set on this {@code NetworkCapability} instance. @return {Number} an array of unwanted capability values for this instance. @hide */ getUnwantedCapabilities : function( ) {}, /**Sets all the capabilities set on this {@code NetworkCapability} instance. This overwrites any existing capabilities. @hide */ setCapabilities : function( ) {}, /** @deprecated use {@link #setCapabilities(int[], int[])} @hide */ setCapabilities : function( ) {}, /**Tests for the presence of a capability on this instance. @param {Number} capability the capabilities to be tested for. @return {Boolean} {@code true} if set on this instance. */ hasCapability : function( ) {}, /** @hide */ hasUnwantedCapability : function( ) {}, /**Check if this NetworkCapabilities has system managed capabilities or not. @hide */ hasConnectivityManagedCapability : function( ) {}, /**Convenience function that returns a human-readable description of the first mutable capability we find. Used to present an error message to apps that request mutable capabilities. @hide */ describeFirstNonRequestableCapability : function( ) {}, /** @hide */ equalsNetCapabilities : function( ) {}, /**Removes the NET_CAPABILITY_NOT_RESTRICTED capability if all the capabilities it provides are typically provided by restricted networks. TODO: consider: - Renaming it to guessRestrictedCapability and make it set the restricted capability bit in addition to clearing it. @hide */ maybeMarkCapabilitiesRestricted : function( ) {}, /** @hide */ isValidTransport : function( ) {}, /**Adds the given transport type to this {@code NetworkCapability} instance. Multiple transports may be applied sequentially. Note that when searching for a network to satisfy a request, any listed in the request will satisfy the request. For example {@code TRANSPORT_WIFI} and {@code TRANSPORT_ETHERNET} added to a {@code NetworkCapabilities} would cause either a Wi-Fi network or an Ethernet network to be selected. This is logically different than {@code NetworkCapabilities.NET_CAPABILITY_*} listed above. @param {Number} transportType the transport type to be added. @return {Object {android.net.NetworkCapabilities}} This NetworkCapabilities instance, to facilitate chaining. @hide */ addTransportType : function( ) {}, /**Removes (if found) the given transport from this {@code NetworkCapability} instance. @param {Number} transportType the transport type to be removed. @return {Object {android.net.NetworkCapabilities}} This NetworkCapabilities instance, to facilitate chaining. @hide */ removeTransportType : function( ) {}, /**Sets (or clears) the given transport on this {@link android.net.NetworkCapabilities} instance. @hide */ setTransportType : function( ) {}, /**Gets all the transports set on this {@code NetworkCapability} instance. @return {Number} an array of transport type values for this instance. @hide */ getTransportTypes : function( ) {}, /**Sets all the transports set on this {@code NetworkCapability} instance. This overwrites any existing transports. @hide */ setTransportTypes : function( ) {}, /**Tests for the presence of a transport on this instance. @param {Number} transportType the transport type to be tested for. @return {Boolean} {@code true} if set on this instance. */ hasTransport : function( ) {}, /** @hide */ equalsTransportTypes : function( ) {}, /**Set the UID of the managing app. @hide */ setEstablishingVpnAppUid : function( ) {}, /** @hide */ getEstablishingVpnAppUid : function( ) {}, /**Sets the upstream bandwidth for this network in Kbps. This always only refers to the estimated first hop transport bandwidth. <p> Note that when used to request a network, this specifies the minimum acceptable. When received as the state of an existing network this specifies the typical first hop bandwidth expected. This is never measured, but rather is inferred from technology type and other link parameters. It could be used to differentiate between very slow 1xRTT cellular links and other faster networks or even between 802.11b vs 802.11AC wifi technologies. It should not be used to differentiate between fast backhauls and slow backhauls. @param {Number} upKbps the estimated first hop upstream (device to network) bandwidth. @hide */ setLinkUpstreamBandwidthKbps : function( ) {}, /**Retrieves the upstream bandwidth for this network in Kbps. This always only refers to the estimated first hop transport bandwidth. @return {Number} The estimated first hop upstream (device to network) bandwidth. */ getLinkUpstreamBandwidthKbps : function( ) {}, /**Sets the downstream bandwidth for this network in Kbps. This always only refers to the estimated first hop transport bandwidth. <p> Note that when used to request a network, this specifies the minimum acceptable. When received as the state of an existing network this specifies the typical first hop bandwidth expected. This is never measured, but rather is inferred from technology type and other link parameters. It could be used to differentiate between very slow 1xRTT cellular links and other faster networks or even between 802.11b vs 802.11AC wifi technologies. It should not be used to differentiate between fast backhauls and slow backhauls. @param {Number} downKbps the estimated first hop downstream (network to device) bandwidth. @hide */ setLinkDownstreamBandwidthKbps : function( ) {}, /**Retrieves the downstream bandwidth for this network in Kbps. This always only refers to the estimated first hop transport bandwidth. @return {Number} The estimated first hop downstream (network to device) bandwidth. */ getLinkDownstreamBandwidthKbps : function( ) {}, /** @hide */ minBandwidth : function( ) {}, /** @hide */ maxBandwidth : function( ) {}, /**Sets the optional bearer specific network specifier. This has no meaning if a single transport is also not specified, so calling this without a single transport set will generate an exception, as will subsequently adding or removing transports after this is set. </p> @param {Object {NetworkSpecifier}} networkSpecifier A concrete, parcelable framework class that extends NetworkSpecifier. @return {Object {android.net.NetworkCapabilities}} This NetworkCapabilities instance, to facilitate chaining. @hide */ setNetworkSpecifier : function( ) {}, /**Sets the optional transport specific information. @param {Object {TransportInfo}} transportInfo A concrete, parcelable framework class that extends {@link TransportInfo}. @return {Object {android.net.NetworkCapabilities}} This NetworkCapabilities instance, to facilitate chaining. @hide */ setTransportInfo : function( ) {}, /**Gets the optional bearer specific network specifier. May be {@code null} if not set. @return {Object {android.net.NetworkSpecifier}} The optional {@link NetworkSpecifier} specifying the bearer specific network specifier or {@code null}. See {@link #setNetworkSpecifier}. @hide */ getNetworkSpecifier : function( ) {}, /**Returns a transport-specific information container. The application may cast this container to a concrete sub-class based on its knowledge of the network request. The application should be able to deal with a {@code null} return value or an invalid case, e.g. use {@code instanceof} operator to verify expected type. @return {Object {android.net.TransportInfo}} A concrete implementation of the {@link TransportInfo} class or null if not available for the network. */ getTransportInfo : function( ) {}, /**Sets the signal strength. This is a signed integer, with higher values indicating a stronger signal. The exact units are bearer-dependent. For example, Wi-Fi uses the same RSSI units reported by wifi code. <p> Note that when used to register a network callback, this specifies the minimum acceptable signal strength. When received as the state of an existing network it specifies the current value. A value of code SIGNAL_STRENGTH_UNSPECIFIED} means no value when received and has no effect when requesting a callback. @param {Number} signalStrength the bearer-specific signal strength. @hide */ setSignalStrength : function( ) {}, /**Returns {@code true} if this object specifies a signal strength. @hide */ hasSignalStrength : function( ) {}, /**Retrieves the signal strength. @return {Number} The bearer-specific signal strength. */ getSignalStrength : function( ) {}, /**Convenience method to set the UIDs this network applies to to a single UID. @hide */ setSingleUid : function( ) {}, /**Set the list of UIDs this network applies to. This makes a copy of the set so that callers can't modify it after the call. @hide */ setUids : function( ) {}, /**Get the list of UIDs this network applies to. This returns a copy of the set so that callers can't modify the original object. @hide */ getUids : function( ) {}, /**Test whether this network applies to this UID. @hide */ appliesToUid : function( ) {}, /**Tests if the set of UIDs that this network applies to is the same as the passed network. <p> This test only checks whether equal range objects are in both sets. It will return false if the ranges are not exactly the same, even if the covered UIDs are for an equivalent result. <p> Note that this method is not very optimized, which is fine as long as it's not used very often. <p> nc is assumed nonnull. @hide */ equalsUids : function( ) {}, /**Test whether the passed NetworkCapabilities satisfies the UIDs this capabilities require. This method is called on the NetworkCapabilities embedded in a request with the capabilities of an available network. It checks whether all the UIDs from this listen (representing the UIDs that must have access to the network) are satisfied by the UIDs in the passed nc (representing the UIDs that this network is available to). <p> As a special exception, the UID that created the passed network (as represented by its mEstablishingVpnAppUid field) always satisfies a NetworkRequest requiring it (of LISTEN or REQUEST types alike), even if the network does not apply to it. That is so a VPN app can see its own network when it listens for it. <p> nc is assumed nonnull. Else, NPE. @see #appliesToUid @hide */ satisfiedByUids : function( ) {}, /**Returns whether this network applies to the passed ranges. This assumes that to apply, the passed range has to be entirely contained within one of the ranges this network applies to. If the ranges are not normalized, this method may return false even though all required UIDs are covered because no single range contained them all. @hide */ appliesToUidRange : function( ) {}, /**Sets the SSID of this network. @hide */ setSSID : function( ) {}, /**Gets the SSID of this network, or null if none or unknown. @hide */ getSSID : function( ) {}, /**Tests if the SSID of this network is the same as the SSID of the passed network. @hide */ equalsSSID : function( ) {}, /**Check if the SSID requirements of this object are matched by the passed object. @hide */ satisfiedBySSID : function( ) {}, /**Combine a set of Capabilities to this one. Useful for coming up with the complete set. <p> Note that this method may break an invariant of having a particular capability in either wanted or unwanted lists but never in both. Requests that have the same capability in both lists will never be satisfied. @hide */ combineCapabilities : function( ) {}, /**Check if our requirements are satisfied by the given {@code NetworkCapabilities}. @param {Object {NetworkCapabilities}} nc the {@code NetworkCapabilities} that may or may not satisfy our requirements. @hide */ satisfiedByNetworkCapabilities : function( ) {}, /**Check if our immutable requirements are satisfied by the given {@code NetworkCapabilities}. @param {Object {NetworkCapabilities}} nc the {@code NetworkCapabilities} that may or may not satisfy our requirements. @hide */ satisfiedByImmutableNetworkCapabilities : function( ) {}, /**Checks that our immutable capabilities are the same as those of the given {@code NetworkCapabilities} and return a String describing any difference. The returned String is empty if there is no difference. @hide */ describeImmutableDifferences : function( ) {}, /**Checks that our requestable capabilities are the same as those of the given {@code NetworkCapabilities}. @hide */ equalRequestableCapabilities : function( ) {}, /** */ equals : function( ) {}, /** */ hashCode : function( ) {}, /** */ describeContents : function( ) {}, /** */ writeToParcel : function( ) {}, /** */ toString : function( ) {}, /** @hide */ appendStringRepresentationOfBitMaskToStringBuilder : function( ) {}, /** @hide */ writeToProto : function( ) {}, /** @hide */ capabilityNamesOf : function( ) {}, /** @hide */ capabilityNameOf : function( ) {}, /** @hide */ transportNamesOf : function( ) {}, /** @hide */ transportNameOf : function( ) {}, /**Check if this {@code NetworkCapability} instance is metered. @return {Boolean} {@code true} if {@code NET_CAPABILITY_NOT_METERED} is not set on this instance. @hide */ isMetered : function( ) {}, };