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_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_LTE |
static int |
RIL_RADIO_TECHNOLOGY_UMTS |
static int |
RIL_RADIO_TECHNOLOGY_UNKNOWN |
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_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 |
---|---|
protected void |
copyFrom(ServiceState s) |
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
boolean |
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void |
fillInNotifierBundle(Bundle m)
Set intent notifier Bundle based on service state.
|
int |
getCdmaDefaultRoamingIndicator() |
int |
getCdmaEriIconIndex() |
int |
getCdmaEriIconMode() |
int |
getCdmaRoamingIndicator() |
int |
getCssIndicator() |
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 |
getRilRadioTechnology() |
boolean |
getRoaming()
Get current roaming indicator of phone
(note: not just decoding from TS 27.007 7.2)
|
int |
getState()
Get current service state of phone
|
int |
getSystemId() |
int |
hashCode()
Returns an integer hash code for this object.
|
static boolean |
isCdma(int radioTechnology) |
boolean |
isEmergencyOnly() |
static boolean |
isGsm(int radioTechnology) |
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 |
setEmergencyOnly(boolean emergencyOnly) |
void |
setIsManualSelection(boolean isManual) |
void |
setOperatorAlphaLong(String longName)
In CDMA, mOperatorAlphaLong can be set from the ERI text.
|
void |
setOperatorName(String longName,
String shortName,
String numeric) |
void |
setRadioTechnology(int state) |
void |
setRoaming(boolean roaming) |
void |
setState(int state) |
void |
setStateOff() |
void |
setStateOutOfService() |
void |
setSystemAndNetworkId(int systemId,
int networkId) |
String |
toString()
Returns a string containing a concise, human-readable description of this
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_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 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 Parcelable.Creator<ServiceState> CREATOR
public ServiceState()
public ServiceState(ServiceState s)
s
- Source service statepublic ServiceState(Parcel in)
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
describeContents
in interface Parcelable
public int getState()
public boolean getRoaming()
public boolean isEmergencyOnly()
public int getCdmaRoamingIndicator()
public int getCdmaDefaultRoamingIndicator()
public int getCdmaEriIconIndex()
public int getCdmaEriIconMode()
public String getOperatorAlphaLong()
public String getOperatorAlphaShort()
public String getOperatorNumeric()
public boolean getIsManualSelection()
public int hashCode()
Object
Object.equals(java.lang.Object)
returns true
must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode
method
if you intend implementing your own hashCode
method.
hashCode
in class Object
Object.equals(java.lang.Object)
public boolean equals(Object o)
Object
o
must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true
only if this ==
o
. See Writing a correct
equals
method
if you intend implementing your own equals
method.
The general contract for the equals
and Object.hashCode()
methods is that if equals
returns true
for
any two objects, then hashCode()
must return the same value for
these objects. This means that subclasses of Object
usually
override either both methods or neither of them.
equals
in class Object
o
- the object to compare this instance with.true
if the specified object is equal to this Object
; false
otherwise.Object.hashCode()
public static String rilRadioTechnologyToString(int rt)
radioTechnology
- public String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
public void setStateOutOfService()
public void setStateOff()
public void setState(int state)
public void setRoaming(boolean roaming)
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 setOperatorAlphaLong(String longName)
public void setIsManualSelection(boolean isManual)
public void fillInNotifierBundle(Bundle m)
m
- intent notifier Bundlepublic void setRadioTechnology(int state)
public void setCssIndicator(int css)
public void setSystemAndNetworkId(int systemId, int networkId)
public int getRilRadioTechnology()
public int getRadioTechnology()
public int getNetworkType()
public int getCssIndicator()
public int getNetworkId()
public int getSystemId()
public static boolean isGsm(int radioTechnology)
public static boolean isCdma(int radioTechnology)