Sequenceablepublic final class NetCapabilities extends Object implements Sequenceable
You can use the methods of NetSpecifier.Builder to set related parameters.
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
BEARER_BLUETOOTH |
Indicates that the network is based on a Bluetooth network.
|
static int |
BEARER_CELLULAR |
Indicates that the network is based on a cellular network.
|
static int |
BEARER_ETHERNET |
Indicates that the network is an Ethernet network.
|
static int |
BEARER_LOWPAN |
Indicates that the network is a LoWPAN network.
|
static int |
BEARER_VPN |
Indicates that the network is a VPN.
|
static int |
BEARER_WIFI |
Indicates that the network is based on a Wi-Fi network.
|
static int |
BEARER_WIFI_AWARE |
Indicates that the network is a Wi-Fi Aware network.
|
static int |
NET_CAPABILITY_BIP0 |
Indicates that the network can access the BIP0 server.
|
static int |
NET_CAPABILITY_BIP1 |
Indicates that the network can access the BIP1 server.
|
static int |
NET_CAPABILITY_BIP2 |
Indicates that the network can access the BIP2 server.
|
static int |
NET_CAPABILITY_BIP3 |
Indicates that the network can access the BIP3 server.
|
static int |
NET_CAPABILITY_BIP4 |
Indicates that the network can access the BIP4 server.
|
static int |
NET_CAPABILITY_BIP5 |
Indicates that the network can access the BIP5 server.
|
static int |
NET_CAPABILITY_BIP6 |
Indicates that the network can access the BIP6 server.
|
static int |
NET_CAPABILITY_CAPTIVE_PORTAL |
Indicates that this network was found to have a captive portal in place last time it was
probed.
|
static int |
NET_CAPABILITY_CBS |
Indicates that the network can access the carrier's CBS server.
|
static int |
NET_CAPABILITY_DUN |
Indicates that the network can access the carrier's DUN or Tethering gateway.
|
static int |
NET_CAPABILITY_EIMS |
Indicates that the network can access the carrier's IMS emergency call server.
|
static int |
NET_CAPABILITY_FOREGROUND |
Indicates that the network is available only for foreground applications.
|
static int |
NET_CAPABILITY_FOTA |
Indicates that the network can access the FOTA server for remote device upgrade.
|
static int |
NET_CAPABILITY_IA |
Indicates that the network can access the carrier's Initial Attach server.
|
static int |
NET_CAPABILITY_IMS |
Indicates that the network can access the IMS server.
|
static int |
NET_CAPABILITY_INTERNAL_DEFAULT |
Indicates that the network can access internal default servers.
|
static int |
NET_CAPABILITY_INTERNET |
Indicates that the network can access the Internet.
|
static int |
NET_CAPABILITY_MCX |
Indicates that the network can access the Mission Critical server of the carrier.
|
static int |
NET_CAPABILITY_MMS |
Indicates that the network can access the carrier's MMSC to send and receive multimedia messages.
|
static int |
NET_CAPABILITY_NOT_CONGESTED |
Indicates that the network is not congested.
|
static int |
NET_CAPABILITY_NOT_METERED |
Indicates that the network traffic is not metered.
|
static int |
NET_CAPABILITY_NOT_RESTRICTED |
Indicates that the network is not restricted.
|
static int |
NET_CAPABILITY_NOT_ROAMING |
Indicates that the network is unavailable during roaming.
|
static int |
NET_CAPABILITY_NOT_SUSPENDED |
Indicates that the network is not suspended.
|
static int |
NET_CAPABILITY_NOT_VPN |
Indicates that the network does not use a VPN.
|
static int |
NET_CAPABILITY_RCS |
Indicates that the network can access the carrier's RCS server.
|
static int |
NET_CAPABILITY_SUPL |
Indicates that the network can access the carrier's SUPL server.
|
static int |
NET_CAPABILITY_TRUSTED |
Indicates that the network is trusted.
|
static int |
NET_CAPABILITY_VALIDATED |
Indicates that the network is available.
|
static int |
NET_CAPABILITY_WIFI_P2P |
Indicates that the network can be used for Wi-Fi Direct.
|
static int |
NET_CAPABILITY_XCAP |
Indicates that the network can access the carrier's XCAP server.
|
static long |
RESTRICTED_CAPABILITIES |
Capabilities that suggest that a network is restricted.
|
static int |
SIGNAL_STRENGTH_UNSPECIFIED |
Unspecified signal strength value.
|
static long |
UNRESTRICTED_CAPABILITIES |
Capabilities that suggest that a network is unrestricted.
|
| 构造器 | 说明 |
|---|---|
NetCapabilities() |
Construct of NetCapabilities.
|
NetCapabilities(NetCapabilities nc) |
Construct of NetCapabilities.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
equals(Object obj) |
Indicates whether some other object is "equal to" this one.
|
int |
getLinkDownstreamBandwidthKbps() |
Retrieves the downstream bandwidth for this network in Kbps.
|
int |
getLinkUpstreamBandwidthKbps() |
Retrieves the upstream bandwidth for this network in Kbps.
|
boolean |
hasBearer(int bearer) |
Checks whether this
NetHandle instance has a specified bearer. |
boolean |
hasCap(int capability) |
Checks whether this
NetHandle instance has a specified capability. |
int |
hashCode() |
Returns a hash code value for the object.
|
boolean |
marshalling(Parcel dest) |
Marshals this
Sequenceable object into a Parcel. |
String |
toString() |
Composes all the members and their values in the class into a string in sequence.
|
boolean |
unmarshalling(Parcel data) |
Unmarshals this
Sequenceable object from a Parcel. |
hasFileDescriptorpublic static final int BEARER_BLUETOOTH
public static final int BEARER_CELLULAR
public static final int BEARER_ETHERNET
public static final int BEARER_LOWPAN
public static final int BEARER_VPN
public static final int BEARER_WIFI
public static final int BEARER_WIFI_AWARE
public static final int NET_CAPABILITY_BIP0
public static final int NET_CAPABILITY_BIP1
public static final int NET_CAPABILITY_BIP2
public static final int NET_CAPABILITY_BIP3
public static final int NET_CAPABILITY_BIP4
public static final int NET_CAPABILITY_BIP5
public static final int NET_CAPABILITY_BIP6
public static final int NET_CAPABILITY_CAPTIVE_PORTAL
public static final int NET_CAPABILITY_CBS
public static final int NET_CAPABILITY_DUN
public static final int NET_CAPABILITY_EIMS
public static final int NET_CAPABILITY_FOREGROUND
public static final int NET_CAPABILITY_FOTA
public static final int NET_CAPABILITY_IA
public static final int NET_CAPABILITY_IMS
public static final int NET_CAPABILITY_INTERNAL_DEFAULT
public static final int NET_CAPABILITY_INTERNET
public static final int NET_CAPABILITY_MCX
public static final int NET_CAPABILITY_MMS
public static final int NET_CAPABILITY_NOT_CONGESTED
public static final int NET_CAPABILITY_NOT_METERED
public static final int NET_CAPABILITY_NOT_RESTRICTED
public static final int NET_CAPABILITY_NOT_ROAMING
public static final int NET_CAPABILITY_NOT_SUSPENDED
public static final int NET_CAPABILITY_NOT_VPN
public static final int NET_CAPABILITY_RCS
public static final int NET_CAPABILITY_SUPL
public static final int NET_CAPABILITY_TRUSTED
public static final int NET_CAPABILITY_VALIDATED
public static final int NET_CAPABILITY_WIFI_P2P
public static final int NET_CAPABILITY_XCAP
public static final long RESTRICTED_CAPABILITIES
public static final int SIGNAL_STRENGTH_UNSPECIFIED
public static final long UNRESTRICTED_CAPABILITIES
public NetCapabilities()
public NetCapabilities(NetCapabilities nc)
nc - Object of the NetCapabilities.public boolean equals(Object obj)
Object
The equals method implements an equivalence relation
on non-null object references:
x, x.equals(x) should return
true.
x and y, x.equals(y)
should return true if and only if
y.equals(x) returns true.
x, y, and z, if
x.equals(y) returns true and
y.equals(z) returns true, then
x.equals(z) should return true.
x and y, multiple invocations of
x.equals(y) consistently return true
or consistently return false, provided no
information used in equals comparisons on the
objects is modified.
x,
x.equals(null) should return false.
The equals method for class Object implements
the most discriminating possible equivalence relation on objects;
that is, for any non-null reference values x and
y, this method returns true if and only
if x and y refer to the same object
(x == y has the value true).
Note that it is generally necessary to override the hashCode
method whenever this method is overridden, so as to maintain the
general contract for the hashCode method, which states
that equal objects must have equal hash codes.
equals 在类中 Objectobj - the reference object with which to compare.true if this object is the same as the obj
argument; false otherwise.Object.hashCode(),
HashMappublic int hashCode()
ObjectHashMap.
The general contract of hashCode is:
hashCode method
must consistently return the same integer, provided no information
used in equals comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
equals(Object)
method, then calling the hashCode method on each of
the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hash tables.
As much as is reasonably practical, the hashCode method defined by
class Object does return distinct integers for distinct
objects. (This is typically implemented by converting the internal
address of the object into an integer, but this implementation
technique is not required by the
Java™ programming language.)
hashCode 在类中 ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public boolean hasCap(int capability)
NetHandle instance has a specified capability.capability - Indicates the capability to check for, which is defined in NetCapabilities.true if this NetHandle instance has the specified capability;
returns false otherwise.public boolean hasBearer(int bearer)
NetHandle instance has a specified bearer.bearer - Indicates the bearer to check for, which is defined in NetCapabilities.true if this NetHandle instance has the specified bearer;
returns false otherwise.public boolean marshalling(Parcel dest)
SequenceableSequenceable object into a Parcel.marshalling 在接口中 Sequenceabledest - Indicates the Parcel object to which the Sequenceable
object will be marshaled..true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel data)
SequenceableSequenceable object from a Parcel.unmarshalling 在接口中 Sequenceabledata - Indicates the Parcel object into which the Sequenceable
object has been marshaled.true if the unmarshalling is successful; returns false otherwise.public int getLinkDownstreamBandwidthKbps()
public int getLinkUpstreamBandwidthKbps()