void unhold() throws CallStateException { if (SC_DBG) log("unhold:"); setState(State.ACTIVE); AudioGroup audioGroup = new AudioGroup(); for (Connection c : mConnections) { ((SipConnection) c).unhold(audioGroup); } setAudioGroupMode(); }
void merge(SipCall that) throws CallStateException { if (SC_DBG) log("merge:"); AudioGroup audioGroup = getAudioGroup(); // copy to an array to avoid concurrent modification as connections // in that.connections will be removed in add(SipConnection). Connection[] cc = that.mConnections.toArray(new Connection[that.mConnections.size()]); for (Connection c : cc) { SipConnection conn = (SipConnection) c; add(conn); if (conn.getState() == Call.State.HOLDING) { conn.unhold(audioGroup); } } that.setState(Call.State.IDLE); }