FileDocCategorySizeDatePackage
SimulatedGsmCallState.javaAPI DocAndroid 5.1 API21858Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony.test

CallInfo

public class CallInfo extends Object

Fields Summary
boolean
mIsMT
State
mState
boolean
mIsMpty
String
mNumber
int
mTOA
Constructors Summary
CallInfo(boolean isMT, State state, boolean isMpty, String number)

        mIsMT = isMT;
        mState = state;
        mIsMpty = isMpty;
        mNumber = number;

        if (number.length() > 0 && number.charAt(0) == '+") {
            mTOA = PhoneNumberUtils.TOA_International;
        } else {
            mTOA = PhoneNumberUtils.TOA_Unknown;
        }
    
Methods Summary
static com.android.internal.telephony.test.CallInfocreateIncomingCall(java.lang.String number)

        return new CallInfo (true, State.INCOMING, false, number);
    
static com.android.internal.telephony.test.CallInfocreateOutgoingCall(java.lang.String number)

        return new CallInfo (false, State.DIALING, false, number);
    
booleanisActiveOrHeld()

        return mState == State.ACTIVE || mState == State.HOLDING;
    
booleanisConnecting()

        return mState == State.DIALING || mState == State.ALERTING;
    
booleanisRinging()

        return mState == State.INCOMING || mState == State.WAITING;
    
java.lang.StringtoCLCCLine(int index)

        return
            "+CLCC: "
            + index + "," + (mIsMT ? "1" : "0") +","
            + mState.value() + ",0," + (mIsMpty ? "1" : "0")
            + ",\"" + mNumber + "\"," + mTOA;
    
com.android.internal.telephony.DriverCalltoDriverCall(int index)

        DriverCall ret;

        ret = new DriverCall();

        ret.index = index;
        ret.isMT = mIsMT;

        try {
            ret.state = DriverCall.stateFromCLCC(mState.value());
        } catch (ATParseEx ex) {
            throw new RuntimeException("should never happen", ex);
        }

        ret.isMpty = mIsMpty;
        ret.number = mNumber;
        ret.TOA = mTOA;
        ret.isVoice = true;
        ret.als = 0;

        return ret;