FileDocCategorySizeDatePackage
NetworkInfo.javaAPI DocAndroid 1.5 API4326Wed May 06 22:42:02 BST 2009com.android.internal.telephony.gsm

NetworkInfo

public class NetworkInfo extends Object implements android.os.Parcelable
{@hide}

Fields Summary
String
operatorAlphaLong
String
operatorAlphaShort
String
operatorNumeric
State
state
public static final Creator
CREATOR
Implement the Parcelable interface Method to deserialize a NetworkInfo object, or an array thereof.
Constructors Summary
NetworkInfo(String operatorAlphaLong, String operatorAlphaShort, String operatorNumeric, State state)


        this.operatorAlphaLong = operatorAlphaLong;
        this.operatorAlphaShort = operatorAlphaShort;
        this.operatorNumeric = operatorNumeric;

        this.state = state;
    
NetworkInfo(String operatorAlphaLong, String operatorAlphaShort, String operatorNumeric, String stateString)

        this (operatorAlphaLong, operatorAlphaShort, 
                operatorNumeric, rilStateToState(stateString));
    
Methods Summary
public intdescribeContents()
Parcelable interface implemented below. This is a simple effort to make NetworkInfo parcelable rather than trying to make the conventional containing object (AsyncResult), implement parcelable. This functionality is needed for the NetworkQueryService to fix 1128695.

        return 0;
    
public java.lang.StringgetOperatorAlphaLong()



     
    
    
        return operatorAlphaLong;
    
public java.lang.StringgetOperatorAlphaShort()

        return operatorAlphaShort;
    
public java.lang.StringgetOperatorNumeric()

        return operatorNumeric;
    
public com.android.internal.telephony.gsm.NetworkInfo$StategetState()

        return state;
    
private static com.android.internal.telephony.gsm.NetworkInfo$StaterilStateToState(java.lang.String s)
See state strings defined in ril.h RIL_REQUEST_QUERY_AVAILABLE_NETWORKS

        if (s.equals("unknown")) {
            return State.UNKNOWN;
        } else if (s.equals("available")) {
            return State.AVAILABLE;
        } else if (s.equals("current")) {
            return State.CURRENT;
        } else if (s.equals("forbidden")) {
            return State.FORBIDDEN;
        } else {
            throw new RuntimeException(
                "RIL impl error: Invalid network state '" + s + "'");
        }
    
public java.lang.StringtoString()

        return "NetworkInfo " + operatorAlphaLong 
                + "/" + operatorAlphaShort 
                + "/" + operatorNumeric 
                + "/" + state;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)
Implement the Parcelable interface. Method to serialize a NetworkInfo object.

        dest.writeString(operatorAlphaLong);
        dest.writeString(operatorAlphaShort);
        dest.writeString(operatorNumeric);
        dest.writeSerializable(state);