Sequenceablepublic final class NetworkState extends Object implements Sequenceable
Applications can obtain the following network state information:
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
NSA_STATE_CONNECTED_DETECT |
Indicates that a device is connected to an LTE network under an LTE cell
that supports NSA and NR coverage detection.
|
static int |
NSA_STATE_DUAL_CONNECTED |
Indicates that a device is connected to an LTE + NR network under an LTE cell that supports NSA.
|
static int |
NSA_STATE_IDLE_DETECT |
Indicates that a device is idle under an LTE cell supporting NSA and NR coverage detection.
|
static int |
NSA_STATE_NO_DETECT |
Indicates that a device is idle under an LTE cell supporting NSA but not NR coverage detection.
|
static int |
NSA_STATE_NOT_SUPPORT |
Indicates that a device is idle under or is connected to an LTE cell that does not support NSA.
|
static int |
NSA_STATE_SA_ATTACHED |
Indicates that a device is idle under or is connected to an NG-RAN cell while being attached to 5GC.
|
static int |
REG_STATE_EMERGENCY_CALL_ONLY |
Indicates a state in which a device can use only the emergency call service.
|
static int |
REG_STATE_IN_SERVICE |
Indicates a state in which a device can use services properly.
|
static int |
REG_STATE_NO_SERVICE |
Indicates a state in which a device cannot use any service.
|
static int |
REG_STATE_POWER_OFF |
Indicates that the cellular radio is powered off.
|
| 构造器 | 说明 |
|---|---|
NetworkState() |
Constructor to create NetworkState instance.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
equals(Object obj) |
Checks whether the values of each member in the two objects are the same.
|
String |
getLongOperatorName() |
Obtains the operator name in the long alphanumeric format of the registered network.
|
int |
getNsaState() |
Obtains the NSA network registration status of the device.
|
String |
getPlmnNumeric() |
Obtains the PLMN code of the registered network.
|
int |
getRegState() |
Obtains the network registration status of the device.
|
String |
getShortOperatorName() |
Obtains the operator name in the short alphanumeric format of the registered network.
|
int |
hashCode() |
Obtains the object's hash code, which is used as an index to search for objects
in
Hashtable and HashMap. |
boolean |
isCaActive() |
Obtains the status of CA.
|
boolean |
isEmergency() |
Checks whether this device is allowed to make emergency calls only.
|
boolean |
isRoaming() |
Checks whether the device is roaming.
|
boolean |
marshalling(Parcel dest) |
Packs all the members in the class into a parcel object.
|
String |
toString() |
Composes all the members and their values in the class into a string in sequence.
|
boolean |
unmarshalling(Parcel in) |
Unpacks all the members of the class from a parcel object.
|
hasFileDescriptorpublic static final int NSA_STATE_CONNECTED_DETECT
public static final int NSA_STATE_DUAL_CONNECTED
public static final int NSA_STATE_IDLE_DETECT
public static final int NSA_STATE_NOT_SUPPORT
public static final int NSA_STATE_NO_DETECT
public static final int NSA_STATE_SA_ATTACHED
public static final int REG_STATE_EMERGENCY_CALL_ONLY
public static final int REG_STATE_IN_SERVICE
public static final int REG_STATE_NO_SERVICE
public static final int REG_STATE_POWER_OFF
public boolean marshalling(Parcel dest)
marshalling 在接口中 Sequenceabledest - Indicates the target parcel into which the members are packed.true if the packing is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
unmarshalling 在接口中 Sequenceablein - Indicates the parcel object to be unpacked.true if the unpacking is successful; returns false otherwise.public String toString()
public int hashCode()
Hashtable and HashMap.hashCode 在类中 ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public String getLongOperatorName()
public String getShortOperatorName()
public String getPlmnNumeric()
public boolean isRoaming()
true if the device is roaming; returns false otherwise.public int getRegState()
public int getNsaState()
public boolean isCaActive()
true if CA is activated; returns false otherwise.public boolean isEmergency()
true if this device is allowed to make emergency calls only;
returns false otherwise.public boolean equals(Object obj)
equals 在类中 Objectother - The other NetworkState instance.true if the values of each member in the two objects are the same;
returns false otherwise.Object.hashCode(),
HashMap