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

RestrictedState

public class RestrictedState extends Object

Fields Summary
private boolean
mPsRestricted
Set true to block packet data access due to restriction
private boolean
mCsNormalRestricted
Set true to block all normal voice/SMS/USSD/SS/AV64 due to restriction
private boolean
mCsEmergencyRestricted
Set true to block emergency call due to restriction
Constructors Summary
public RestrictedState()

        setPsRestricted(false);
        setCsNormalRestricted(false);
        setCsEmergencyRestricted(false);
    
Methods Summary
public booleanequals(java.lang.Object o)

        RestrictedState s;

        try {
            s = (RestrictedState) o;
        } catch (ClassCastException ex) {
            return false;
        }

        if (o == null) {
            return false;
        }

        return mPsRestricted == s.mPsRestricted
        && mCsNormalRestricted == s.mCsNormalRestricted
        && mCsEmergencyRestricted == s.mCsEmergencyRestricted;
    
public booleanisCsEmergencyRestricted()

return
the csEmergencyRestricted

        return mCsEmergencyRestricted;
    
public booleanisCsNormalRestricted()

return
the csNormalRestricted

        return mCsNormalRestricted;
    
public booleanisCsRestricted()

        return mCsNormalRestricted && mCsEmergencyRestricted;
    
public booleanisPsRestricted()

return
the psRestricted

        return mPsRestricted;
    
public voidsetCsEmergencyRestricted(boolean csEmergencyRestricted)

param
csEmergencyRestricted the csEmergencyRestricted to set

        mCsEmergencyRestricted = csEmergencyRestricted;
    
public voidsetCsNormalRestricted(boolean csNormalRestricted)

param
csNormalRestricted the csNormalRestricted to set

        mCsNormalRestricted = csNormalRestricted;
    
public voidsetPsRestricted(boolean psRestricted)

param
psRestricted the psRestricted to set

        mPsRestricted = psRestricted;
    
public java.lang.StringtoString()

        String csString = "none";
        
        if (mCsEmergencyRestricted && mCsNormalRestricted) {
            csString = "all";
        } else if (mCsEmergencyRestricted && !mCsNormalRestricted) {
            csString = "emergency";
        } else if (!mCsEmergencyRestricted && mCsNormalRestricted) {
            csString = "normal call";
        }
        
        return  "Restricted State CS: " + csString + " PS:" + mPsRestricted;