FileDocCategorySizeDatePackage
SimulatedGsmCallState.javaAPI DocAndroid 1.5 API21945Wed May 06 22:42:02 BST 2009com.android.internal.telephony.test

CallInfo

public class CallInfo extends Object

Fields Summary
boolean
isMT
State
state
boolean
isMpty
String
number
int
TOA
Constructors Summary
CallInfo(boolean isMT, State state, boolean isMpty, String number)

        this.isMT = isMT;
        this.state = state;
        this.isMpty = isMpty;
        this.number = number;

        if (number.length() > 0 && number.charAt(0) == '+") {
            TOA = PhoneNumberUtils.TOA_International;
        } else {
            TOA = 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 state == State.ACTIVE || state == State.HOLDING;
    
booleanisConnecting()

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

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

        return 
            "+CLCC: "
            + index + "," + (isMT ? "1" : "0") +","
            + state.value() + ",0," + (isMpty ? "1" : "0")
            + ",\"" + number + "\"," + TOA;
    
com.android.internal.telephony.gsm.DriverCalltoDriverCall(int index)

        DriverCall ret; 

        ret = new DriverCall();

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

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

        ret.isMpty = isMpty;
        ret.number = number;
        ret.TOA = TOA;
        ret.isVoice = true;
        ret.als = 0;

        return ret;