src/net/java/sip/communicator/service/protocol/media/MediaAwareCall.java
/**
     * Removes <tt>callPeer</tt> from the list of peers in this call. The method
     * has no effect if there was no such peer in the call.
     *
     * @param evt the event containing the <tt>CallPeer</tt> leaving the call and
     * the reason (if any) for the <tt>CallPeerChangeEvent</tt>. Use the event
     * as the cause for the call state change event.
     */
Removes callPeer from the list of peers in this call. The method
has no effect if there was no such peer in the call.

@param evt the event containing the CallPeer leaving the call and
the reason (if any) for the CallPeerChangeEvent. Use the event
as the cause for the call state change event.
Removes callPeer from the list of peers in this call . The method has no effect if there was no such peer in the call . @param evt the event containing the CallPeer leaving the call and the reason ( if any ) for the CallPeerChangeEvent . Use the event as the cause for the call state change event .
private void removeCallPeer(CallPeerChangeEvent evt)
    {
        @SuppressWarnings("unchecked")
        T callPeer = (T) evt.getSourceCallPeer();
        if (!doRemoveCallPeer(callPeer))
            return;
        callPeer.removeCallPeerListener(this);
        synchronized (localUserAudioLevelListenersSyncRoot)
        {
            callPeer.getMediaHandler().setLocalUserAudioLevelListener(null);
            List<T> callPeers = getCallPeerList();
            if(!callPeers.isEmpty())
            {
                callPeers
                    .get(0)
                        .getMediaHandler()
                            .setLocalUserAudioLevelListener(
                                    localAudioLevelDelegator);
            }
        }
        try
        {
            fireCallPeerEvent(callPeer, CallPeerEvent.CALL_PEER_REMOVED,
                (evt.getReasonString() != null));
        }
        finally
        {
            /*
             * The peer should lose its state once it has finished firing the
             * events in order to allow the listeners to undo.
             */
            callPeer.setCall(null);
        }
        if (getCallPeerCount() == 0)
            setCallState(CallState.CALL_ENDED, evt);
    }
private void removeCallPeer ( CallPeerChangeEvent evt ) { @ SuppressWarnings ( "unchecked" ) T callPeer = ( T ) evt . getSourceCallPeer ( ) ; if ( ! doRemoveCallPeer ( callPeer ) ) return ; callPeer . removeCallPeerListener ( this ) ; synchronized ( localUserAudioLevelListenersSyncRoot ) { callPeer . getMediaHandler ( ) . setLocalUserAudioLevelListener ( null ) ; List < T > callPeers = getCallPeerList ( ) ; if ( ! callPeers . isEmpty ( ) ) { callPeers . get ( 0 ) . getMediaHandler ( ) . setLocalUserAudioLevelListener ( localAudioLevelDelegator ) ; } } try { fireCallPeerEvent ( callPeer , CallPeerEvent . CALL_PEER_REMOVED , ( evt . getReasonString ( ) != null ) ) ; } finally { /*
             * The peer should lose its state once it has finished firing the
             * events in order to allow the listeners to undo.
             */ callPeer . setCall ( null ) ; } if ( getCallPeerCount ( ) == 0 ) setCallState ( CallState . CALL_ENDED , evt ) ; }
Removes <tt>callPeer</tt> from the list of peers in this call.
Removes <tt > callPeer< / tt > from the list of peers in this call .
// remove sound level listeners from the peer // if there are more peers and the peer was the first, the one // that listens for local levels, now lets make sure // the new first will listen for local level events