public class ServiceState extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<ServiceState> |
CREATOR |
static int |
REGISTRATION_STATE_HOME_NETWORK |
static int |
REGISTRATION_STATE_NOT_REGISTERED_AND_NOT_SEARCHING |
static int |
REGISTRATION_STATE_NOT_REGISTERED_AND_SEARCHING |
static int |
REGISTRATION_STATE_REGISTRATION_DENIED |
static int |
REGISTRATION_STATE_ROAMING |
static int |
REGISTRATION_STATE_UNKNOWN |
static int |
RIL_RADIO_CDMA_TECHNOLOGY_BITMASK |
static int |
RIL_RADIO_TECHNOLOGY_1xRTT |
static int |
RIL_RADIO_TECHNOLOGY_EDGE |
static int |
RIL_RADIO_TECHNOLOGY_EHRPD |
static int |
RIL_RADIO_TECHNOLOGY_EVDO_0 |
static int |
RIL_RADIO_TECHNOLOGY_EVDO_A |
static int |
RIL_RADIO_TECHNOLOGY_EVDO_B |
static int |
RIL_RADIO_TECHNOLOGY_GPRS |
static int |
RIL_RADIO_TECHNOLOGY_GSM
GSM radio technology only supports voice.
|
static int |
RIL_RADIO_TECHNOLOGY_HSDPA |
static int |
RIL_RADIO_TECHNOLOGY_HSPA |
static int |
RIL_RADIO_TECHNOLOGY_HSPAP |
static int |
RIL_RADIO_TECHNOLOGY_HSUPA |
static int |
RIL_RADIO_TECHNOLOGY_IS95A |
static int |
RIL_RADIO_TECHNOLOGY_IS95B |
static int |
RIL_RADIO_TECHNOLOGY_IWLAN
IWLAN
|
static int |
RIL_RADIO_TECHNOLOGY_LTE |
static int |
RIL_RADIO_TECHNOLOGY_LTE_CA
LTE_CA
|
static int |
RIL_RADIO_TECHNOLOGY_TD_SCDMA |
static int |
RIL_RADIO_TECHNOLOGY_UMTS |
static int |
RIL_RADIO_TECHNOLOGY_UNKNOWN |
static int |
RIL_REG_STATE_DENIED |
static int |
RIL_REG_STATE_DENIED_EMERGENCY_CALL_ENABLED |
static int |
RIL_REG_STATE_HOME |
static int |
RIL_REG_STATE_NOT_REG
RIL level registration state values from ril.h
((const char **)response)[0] is registration state 0-6,
0 - Not registered, MT is not currently searching
a new operator to register
1 - Registered, home network
2 - Not registered, but MT is currently searching
a new operator to register
3 - Registration denied
4 - Unknown
5 - Registered, roaming
10 - Same as 0, but indicates that emergency calls
are enabled.
12 - Same as 2, but indicates that emergency calls
are enabled.
13 - Same as 3, but indicates that emergency calls
are enabled.
14 - Same as 4, but indicates that emergency calls
are enabled.
|
static int |
RIL_REG_STATE_NOT_REG_EMERGENCY_CALL_ENABLED |
static int |
RIL_REG_STATE_ROAMING |
static int |
RIL_REG_STATE_SEARCHING |
static int |
RIL_REG_STATE_SEARCHING_EMERGENCY_CALL_ENABLED |
static int |
RIL_REG_STATE_UNKNOWN |
static int |
RIL_REG_STATE_UNKNOWN_EMERGENCY_CALL_ENABLED |
static int |
ROAMING_TYPE_DOMESTIC
Roaming type
DOMESTIC : in domestic roaming network
|
static int |
ROAMING_TYPE_INTERNATIONAL
Roaming type
INTERNATIONAL : in international roaming network
|
static int |
ROAMING_TYPE_NOT_ROAMING
Roaming type
HOME : in home network
|
static int |
ROAMING_TYPE_UNKNOWN
Roaming type
UNKNOWN : in a roaming network, but we can not tell if it's domestic or international
|
static int |
STATE_EMERGENCY_ONLY
The phone is registered and locked.
|
static int |
STATE_IN_SERVICE
Normal operation condition, the phone is registered
with an operator either in home network or in roaming.
|
static int |
STATE_OUT_OF_SERVICE
Phone is not registered with any operator, the phone
can be currently searching a new operator to register to, or not
searching to registration at all, or registration is denied, or radio
signal is not available.
|
static int |
STATE_POWER_OFF
Radio of telephony is explicitly powered off.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
ServiceState()
Empty constructor
|
ServiceState(Parcel in)
Construct a ServiceState object from the given parcel.
|
ServiceState(ServiceState s)
Copy constructors
|
Modifier and Type | Method and Description |
---|---|
static boolean |
bearerBitmapHasCdma(int radioTechnologyBitmap) |
static boolean |
bitmaskHasTech(int bearerBitmask,
int radioTech) |
protected void |
copyFrom(ServiceState s) |
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
void |
fillInNotifierBundle(Bundle m)
Set intent notifier Bundle based on service state.
|
static int |
getBitmaskForTech(int radioTech) |
static int |
getBitmaskFromString(String bearerList) |
int |
getCdmaDefaultRoamingIndicator() |
int |
getCdmaEriIconIndex() |
int |
getCdmaEriIconMode() |
int |
getCdmaRoamingIndicator() |
int |
getCssIndicator() |
int |
getDataNetworkType() |
String |
getDataOperatorAlphaLong()
Get current registered data network operator name in long alphanumeric format.
|
String |
getDataOperatorAlphaShort()
Get current registered data network operator name in short alphanumeric format.
|
String |
getDataOperatorNumeric()
Get current registered data network operator numeric id.
|
int |
getDataRegState()
Get current data service state
|
boolean |
getDataRoaming()
Get current data network roaming type
|
boolean |
getDataRoamingFromRegistration()
Get whether data network registration state is roaming
|
int |
getDataRoamingType()
Get current data network roaming type
|
boolean |
getIsManualSelection()
Get current network selection mode.
|
int |
getNetworkId() |
int |
getNetworkType() |
String |
getOperatorAlphaLong()
Get current registered operator name in long alphanumeric format.
|
String |
getOperatorAlphaShort()
Get current registered operator name in short alphanumeric format.
|
String |
getOperatorNumeric()
Get current registered operator numeric id.
|
int |
getRadioTechnology() |
int |
getRilDataRadioTechnology() |
int |
getRilVoiceRadioTechnology() |
boolean |
getRoaming()
Get current roaming indicator of phone
(note: not just decoding from TS 27.007 7.2)
|
static String |
getRoamingLogString(int roamingType)
get String description of roaming type
|
int |
getState()
Get current voice service state
|
int |
getSystemId() |
int |
getVoiceNetworkType() |
String |
getVoiceOperatorAlphaLong()
Get current registered voice network operator name in long alphanumeric format.
|
String |
getVoiceOperatorAlphaShort()
Get current registered voice network operator name in short alphanumeric format.
|
String |
getVoiceOperatorNumeric()
Get current registered voice network operator numeric id.
|
int |
getVoiceRegState()
Get current voice service state
|
boolean |
getVoiceRoaming()
Get current voice network roaming status
|
int |
getVoiceRoamingType()
Get current voice network roaming type
|
int |
hashCode()
Returns a hash code value for the object.
|
static boolean |
isCdma(int radioTechnology) |
boolean |
isEmergencyOnly() |
static boolean |
isGsm(int radioTechnology) |
static boolean |
isLte(int radioTechnology) |
boolean |
isUsingCarrierAggregation() |
static ServiceState |
mergeServiceStates(ServiceState baseSs,
ServiceState voiceSs)
Returns a merged ServiceState consisting of the base SS with voice settings from the
voice SS.
|
static ServiceState |
newFromBundle(Bundle m)
Create a new ServiceState from a intent notifier Bundle
This method is used by PhoneStateIntentReceiver and maybe by
external applications.
|
static String |
rilRadioTechnologyToString(int rt)
Convert radio technology to String
|
void |
setCdmaDefaultRoamingIndicator(int roaming) |
void |
setCdmaEriIconIndex(int index) |
void |
setCdmaEriIconMode(int mode) |
void |
setCdmaRoamingIndicator(int roaming) |
void |
setCssIndicator(int css) |
void |
setDataOperatorAlphaLong(String longName) |
void |
setDataOperatorName(String longName,
String shortName,
String numeric) |
void |
setDataRegState(int state) |
void |
setDataRoaming(boolean dataRoaming) |
void |
setDataRoamingFromRegistration(boolean dataRoaming)
Set whether data network registration state is roaming
This should only be set to the roaming value received
once the data registration phase has completed.
|
void |
setDataRoamingType(int type) |
void |
setEmergencyOnly(boolean emergencyOnly) |
void |
setIsManualSelection(boolean isManual) |
void |
setIsUsingCarrierAggregation(boolean ca) |
void |
setOperatorAlphaLong(String longName)
In CDMA, mOperatorAlphaLong can be set from the ERI text.
|
void |
setOperatorName(String longName,
String shortName,
String numeric) |
void |
setRilDataRadioTechnology(int rt) |
void |
setRilVoiceRadioTechnology(int rt) |
void |
setRoaming(boolean roaming) |
void |
setState(int state) |
void |
setStateOff() |
void |
setStateOutOfService() |
void |
setSystemAndNetworkId(int systemId,
int networkId) |
void |
setVoiceOperatorAlphaLong(String longName) |
void |
setVoiceOperatorName(String longName,
String shortName,
String numeric) |
void |
setVoiceRegState(int state) |
void |
setVoiceRoaming(boolean roaming) |
void |
setVoiceRoamingType(int type) |
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel out,
int flags)
Flatten this object in to a Parcel.
|
public static final int STATE_IN_SERVICE
public static final int STATE_OUT_OF_SERVICE
public static final int STATE_EMERGENCY_ONLY
public static final int STATE_POWER_OFF
public static final int RIL_REG_STATE_NOT_REG
public static final int RIL_REG_STATE_HOME
public static final int RIL_REG_STATE_SEARCHING
public static final int RIL_REG_STATE_DENIED
public static final int RIL_REG_STATE_UNKNOWN
public static final int RIL_REG_STATE_ROAMING
public static final int RIL_REG_STATE_NOT_REG_EMERGENCY_CALL_ENABLED
public static final int RIL_REG_STATE_SEARCHING_EMERGENCY_CALL_ENABLED
public static final int RIL_REG_STATE_DENIED_EMERGENCY_CALL_ENABLED
public static final int RIL_REG_STATE_UNKNOWN_EMERGENCY_CALL_ENABLED
public static final int RIL_RADIO_TECHNOLOGY_UNKNOWN
public static final int RIL_RADIO_TECHNOLOGY_GPRS
public static final int RIL_RADIO_TECHNOLOGY_EDGE
public static final int RIL_RADIO_TECHNOLOGY_UMTS
public static final int RIL_RADIO_TECHNOLOGY_IS95A
public static final int RIL_RADIO_TECHNOLOGY_IS95B
public static final int RIL_RADIO_TECHNOLOGY_1xRTT
public static final int RIL_RADIO_TECHNOLOGY_EVDO_0
public static final int RIL_RADIO_TECHNOLOGY_EVDO_A
public static final int RIL_RADIO_TECHNOLOGY_HSDPA
public static final int RIL_RADIO_TECHNOLOGY_HSUPA
public static final int RIL_RADIO_TECHNOLOGY_HSPA
public static final int RIL_RADIO_TECHNOLOGY_EVDO_B
public static final int RIL_RADIO_TECHNOLOGY_EHRPD
public static final int RIL_RADIO_TECHNOLOGY_LTE
public static final int RIL_RADIO_TECHNOLOGY_HSPAP
public static final int RIL_RADIO_TECHNOLOGY_GSM
public static final int RIL_RADIO_TECHNOLOGY_TD_SCDMA
public static final int RIL_RADIO_TECHNOLOGY_IWLAN
public static final int RIL_RADIO_TECHNOLOGY_LTE_CA
public static final int RIL_RADIO_CDMA_TECHNOLOGY_BITMASK
public static final int REGISTRATION_STATE_NOT_REGISTERED_AND_NOT_SEARCHING
public static final int REGISTRATION_STATE_HOME_NETWORK
public static final int REGISTRATION_STATE_NOT_REGISTERED_AND_SEARCHING
public static final int REGISTRATION_STATE_REGISTRATION_DENIED
public static final int REGISTRATION_STATE_UNKNOWN
public static final int REGISTRATION_STATE_ROAMING
public static final int ROAMING_TYPE_NOT_ROAMING
public static final int ROAMING_TYPE_UNKNOWN
public static final int ROAMING_TYPE_DOMESTIC
public static final int ROAMING_TYPE_INTERNATIONAL
public static final Parcelable.Creator<ServiceState> CREATOR
public ServiceState()
public ServiceState(ServiceState s)
s
- Source service statepublic ServiceState(Parcel in)
public static final String getRoamingLogString(int roamingType)
public static ServiceState newFromBundle(Bundle m)
m
- Bundle from intent notifierprotected void copyFrom(ServiceState s)
public void writeToParcel(Parcel out, int flags)
Parcelable
writeToParcel
in interface Parcelable
out
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public int getState()
public int getVoiceRegState()
public int getDataRegState()
public boolean getRoaming()
public boolean getVoiceRoaming()
public int getVoiceRoamingType()
public boolean getDataRoaming()
public void setDataRoamingFromRegistration(boolean dataRoaming)
public boolean getDataRoamingFromRegistration()
public int getDataRoamingType()
public boolean isEmergencyOnly()
public int getCdmaRoamingIndicator()
public int getCdmaDefaultRoamingIndicator()
public int getCdmaEriIconIndex()
public int getCdmaEriIconMode()
public String getOperatorAlphaLong()
public String getVoiceOperatorAlphaLong()
public String getDataOperatorAlphaLong()
public String getOperatorAlphaShort()
public String getVoiceOperatorAlphaShort()
public String getDataOperatorAlphaShort()
public String getOperatorNumeric()
public String getVoiceOperatorNumeric()
public String getDataOperatorNumeric()
public boolean getIsManualSelection()
public int hashCode()
Object
HashMap
.
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
JavaTM programming language.)
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
public boolean equals(Object o)
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
in class Object
o
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.Object.hashCode()
,
HashMap
public static String rilRadioTechnologyToString(int rt)
radioTechnology
- public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public void setStateOutOfService()
public void setStateOff()
public void setState(int state)
public void setVoiceRegState(int state)
public void setDataRegState(int state)
public void setRoaming(boolean roaming)
public void setVoiceRoaming(boolean roaming)
public void setVoiceRoamingType(int type)
public void setDataRoaming(boolean dataRoaming)
public void setDataRoamingType(int type)
public void setEmergencyOnly(boolean emergencyOnly)
public void setCdmaRoamingIndicator(int roaming)
public void setCdmaDefaultRoamingIndicator(int roaming)
public void setCdmaEriIconIndex(int index)
public void setCdmaEriIconMode(int mode)
public void setVoiceOperatorName(String longName, String shortName, String numeric)
public void setDataOperatorName(String longName, String shortName, String numeric)
public void setOperatorAlphaLong(String longName)
public void setVoiceOperatorAlphaLong(String longName)
public void setDataOperatorAlphaLong(String longName)
public void setIsManualSelection(boolean isManual)
public void fillInNotifierBundle(Bundle m)
m
- intent notifier Bundlepublic void setRilVoiceRadioTechnology(int rt)
public void setRilDataRadioTechnology(int rt)
public boolean isUsingCarrierAggregation()
public void setIsUsingCarrierAggregation(boolean ca)
public void setCssIndicator(int css)
public void setSystemAndNetworkId(int systemId, int networkId)
public int getRilVoiceRadioTechnology()
public int getRilDataRadioTechnology()
public int getRadioTechnology()
public int getNetworkType()
public int getDataNetworkType()
public int getVoiceNetworkType()
public int getCssIndicator()
public int getNetworkId()
public int getSystemId()
public static boolean isGsm(int radioTechnology)
public static boolean isCdma(int radioTechnology)
public static boolean isLte(int radioTechnology)
public static boolean bearerBitmapHasCdma(int radioTechnologyBitmap)
public static boolean bitmaskHasTech(int bearerBitmask, int radioTech)
public static int getBitmaskForTech(int radioTech)
public static int getBitmaskFromString(String bearerList)
public static ServiceState mergeServiceStates(ServiceState baseSs, ServiceState voiceSs)