Exemple #1
0
    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);
    }