public void conference(Call that) throws CallStateException { synchronized (SipPhone.class) { if (!(that instanceof SipCall)) { throw new CallStateException( "expect " + SipCall.class + ", cannot merge with " + that.getClass()); } mForegroundCall.merge((SipCall) that); } }
@Override public void conference() throws CallStateException { synchronized (SipPhone.class) { if ((mForegroundCall.getState() != SipCall.State.ACTIVE) || (mForegroundCall.getState() != SipCall.State.ACTIVE)) { throw new CallStateException( "wrong state to merge calls: fg=" + mForegroundCall.getState() + ", bg=" + mBackgroundCall.getState()); } if (DBG) log("conference: merge fg & bg"); mForegroundCall.merge(mBackgroundCall); } }