FileDocCategorySizeDatePackage
GsmCall.javaAPI DocAndroid 5.1 API5024Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony.gsm

GsmCall

public class GsmCall extends com.android.internal.telephony.Call
{@hide}

Fields Summary
GsmCallTracker
mOwner
Instance Variables
Constructors Summary
GsmCall(GsmCallTracker owner)
Constructors

        mOwner = owner;
    
Methods Summary
voidattach(com.android.internal.telephony.Connection conn, com.android.internal.telephony.DriverCall dc)

        mConnections.add(conn);

        mState = stateFromDCState (dc.state);
    
voidattachFake(com.android.internal.telephony.Connection conn, State state)

        mConnections.add(conn);

        mState = state;
    
voidclearDisconnected()
Called when it's time to clean up disconnected Connection objects

        for (int i = mConnections.size() - 1 ; i >= 0 ; i--) {
            GsmConnection cn = (GsmConnection)mConnections.get(i);

            if (cn.getState() == State.DISCONNECTED) {
                mConnections.remove(i);
            }
        }

        if (mConnections.size() == 0) {
            mState = State.IDLE;
        }
    
booleanconnectionDisconnected(GsmConnection conn)
Called by GsmConnection when it has disconnected

        if (mState != State.DISCONNECTED) {
            /* If only disconnected connections remain, we are disconnected*/

            boolean hasOnlyDisconnectedConnections = true;

            for (int i = 0, s = mConnections.size()  ; i < s; i ++) {
                if (mConnections.get(i).getState()
                    != State.DISCONNECTED
                ) {
                    hasOnlyDisconnectedConnections = false;
                    break;
                }
            }

            if (hasOnlyDisconnectedConnections) {
                mState = State.DISCONNECTED;
                return true;
            }
        }

        return false;
    
voiddetach(GsmConnection conn)

        mConnections.remove(conn);

        if (mConnections.size() == 0) {
            mState = State.IDLE;
        }
    
public voiddispose()

    
public java.util.ListgetConnections()
Overridden from Call

        // FIXME should return Collections.unmodifiableList();
        return mConnections;
    
public com.android.internal.telephony.PhonegetPhone()

        return mOwner.mPhone;
    
public voidhangup()
Please note: if this is the foreground call and a background call exists, the background call will be resumed because an AT+CHLD=1 will be sent

        mOwner.hangup(this);
    
booleanisFull()

return
true if there's no space in this call for additional connections to be added via "conference"

        return mConnections.size() == GsmCallTracker.MAX_CONNECTIONS_PER_CALL;
    
public booleanisMultiparty()

        return mConnections.size() > 1;
    
voidonHangupLocal()
Called when this Call is being hung up locally (eg, user pressed "end") Note that at this point, the hangup request has been dispatched to the radio but no response has yet been received so update() has not yet been called

        for (int i = 0, s = mConnections.size()
                ; i < s; i++
        ) {
            GsmConnection cn = (GsmConnection)mConnections.get(i);

            cn.onHangupLocal();
        }
        mState = State.DISCONNECTING;
    
public java.lang.StringtoString()

        return mState.toString();
    
booleanupdate(GsmConnection conn, com.android.internal.telephony.DriverCall dc)

        State newState;
        boolean changed = false;

        newState = stateFromDCState(dc.state);

        if (newState != mState) {
            mState = newState;
            changed = true;
        }

        return changed;