Methods Summary |
---|
void | attach(GSMConnection conn, DriverCall dc)
connections.add(conn);
state = stateFromDCState (dc.state);
|
void | attachFake(GSMConnection conn, State state)
connections.add(conn);
this.state = state;
|
void | clearDisconnected()Called when it's time to clean up disconnected Connection objects
for (int i = connections.size() - 1 ; i >= 0 ; i--) {
GSMConnection cn = (GSMConnection)connections.get(i);
if (cn.getState() == State.DISCONNECTED) {
connections.remove(i);
}
}
if (connections.size() == 0) {
state = State.IDLE;
}
|
void | connectionDisconnected(GSMConnection conn)Called by GSMConnection when it has disconnected
if (state != State.DISCONNECTED) {
/* If only disconnected connections remain, we are disconnected*/
boolean hasOnlyDisconnectedConnections = true;
for (int i = 0, s = connections.size() ; i < s; i ++) {
if (connections.get(i).getState()
!= State.DISCONNECTED
) {
hasOnlyDisconnectedConnections = false;
break;
}
}
if (hasOnlyDisconnectedConnections) {
state = State.DISCONNECTED;
}
}
|
void | detach(GSMConnection conn)
connections.remove(conn);
if (connections.size() == 0) {
state = State.IDLE;
}
|
public java.util.List | getConnections()Overridden from Call
// FIXME should return Collections.unmodifiableList();
return connections;
|
public Phone | getPhone()
//TODO
return null;
|
public State | getState()
return state;
|
public void | hangup()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
owner.hangup(this);
|
boolean | isFull()
return connections.size() == CallTracker.MAX_CONNECTIONS_PER_CALL;
|
public boolean | isMultiparty()
return connections.size() > 1;
|
void | onHangupLocal()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 = connections.size()
; i < s; i++
) {
GSMConnection cn = (GSMConnection)connections.get(i);
cn.onHangupLocal();
}
|
static State | stateFromDCState(DriverCall.State dcState)Class Methods
switch (dcState) {
case ACTIVE: return State.ACTIVE;
case HOLDING: return State.HOLDING;
case DIALING: return State.DIALING;
case ALERTING: return State.ALERTING;
case INCOMING: return State.INCOMING;
case WAITING: return State.WAITING;
default: throw new RuntimeException ("illegal call state:" + dcState);
}
|
public java.lang.String | toString()
return state.toString();
|
boolean | update(GSMConnection conn, DriverCall dc)
State newState;
boolean changed = false;
newState = stateFromDCState(dc.state);
if (newState != state) {
state = newState;
changed = true;
}
return changed;
|