|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.telephony.ServiceState
public class ServiceState
Contains phone state and service related information. The following phone information is included in returned ServiceState:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface android.os.Parcelable |
|---|
Parcelable.Creator<T> |
| Field Summary | |
|---|---|
static Parcelable.Creator<ServiceState> |
CREATOR
|
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 explictly powered off. |
| Fields inherited from interface android.os.Parcelable |
|---|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE |
| Constructor Summary | |
|---|---|
ServiceState()
Empty constructor |
|
ServiceState(Parcel in)
Construct a ServiceState object from the given parcel. |
|
ServiceState(ServiceState s)
Copy constructors |
|
| Method Summary | |
|---|---|
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 the argument to the receiver, and returns true if they represent the same object using a class specific comparison. |
void |
fillInNotifierBundle(Bundle m)
Set intent notifier Bundle based on service state |
boolean |
getIsManualSelection()
Get current network selection mode |
String |
getOperatorAlphaLong()
Get current registered operator name in long alphanumeric format In GSM/UMTS, long format can be upto 16 characters long |
String |
getOperatorAlphaShort()
Get current registered operator name in short lphanumeric format In GSM/UMST, short format can be upto 8 characters long |
String |
getOperatorNumeric()
Get current registered operator numeric id In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit network code The country code can be decoded using MccTable.countryCodeForMcc() |
boolean |
getRoaming()
Get current roaming indicator of phone (note: not just decoding from TS 27.007 7.2) |
int |
getState()
Get current servcie state of phone |
int |
hashCode()
Returns an integer hash code for the receiver. |
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. |
void |
setIsManualSelection(boolean isManual)
|
void |
setOperatorName(String longName,
String shortName,
String numeric)
|
void |
setRoaming(boolean roaming)
|
void |
setState(int state)
|
void |
setStateOff()
|
void |
setStateOutOfService()
|
String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
void |
writeToParcel(Parcel out,
int flags)
Flatten this object in to a Parcel. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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 Parcelable.Creator<ServiceState> CREATOR
| Constructor Detail |
|---|
public ServiceState()
public ServiceState(ServiceState s)
s - Source service statepublic ServiceState(Parcel in)
| Method Detail |
|---|
public static ServiceState newFromBundle(Bundle m)
m - Bundle from intent notifier
protected void copyFrom(ServiceState s)
public void writeToParcel(Parcel out,
int flags)
Parcelable
writeToParcel in interface Parcelableout - 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 Parcelablepublic int getState()
STATE_IN_SERVICE,
STATE_OUT_OF_SERVICE,
STATE_EMERGENCY_ONLY,
STATE_POWER_OFFpublic boolean getRoaming()
public String getOperatorAlphaLong()
public String getOperatorAlphaShort()
public String getOperatorNumeric()
public boolean getIsManualSelection()
public int hashCode()
Objecttrue when passed to .equals must
answer the same value for this method.
hashCode in class ObjectObject.equals(java.lang.Object)public boolean equals(Object o)
Object
equals in class Objecto - Object the object to compare with this object.
true if the object is the same as this
object false if it is different from this object.Object.hashCode()public String toString()
Object
toString in class Objectpublic void setStateOutOfService()
public void setStateOff()
public void setState(int state)
public void setRoaming(boolean roaming)
public void setOperatorName(String longName,
String shortName,
String numeric)
public void setIsManualSelection(boolean isManual)
public void fillInNotifierBundle(Bundle m)
m - intent notifier Bundle
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||