diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java index 71d99e39e..e4afa5b84 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java @@ -320,16 +320,6 @@ public static void putOnHold(CallPeer callPeer, boolean isOnHold) new PutOnHoldCallPeerThread(callPeer, isOnHold).start(); } - /** - * Mutes the given callPeer. - * @param callPeer the peer to mute - * @param isMute indicates the action (disable or enable mute) - */ - public static void mute(CallPeer callPeer, boolean isMute) - { - new MuteCallPeerThread(callPeer, isMute).start(); - } - /** * Transfers the given peer to the given target. * @param peer the CallPeer to transfer @@ -923,32 +913,6 @@ public void run() } } - /** - * Mutes the given CallPeer. - */ - private static class MuteCallPeerThread - extends Thread - { - private final CallPeer callPeer; - - private final boolean isMute; - - public MuteCallPeerThread(CallPeer callPeer, boolean isMute) - { - this.callPeer = callPeer; - this.isMute = isMute; - } - - public void run() - { - OperationSetBasicTelephony telephony = - callPeer.getProtocolProvider() - .getOperationSet(OperationSetBasicTelephony.class); - - telephony.setMute(callPeer, isMute); - } - } - /** * Stops all telephony related sounds. */ diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java index 92fe13330..89776fde2 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java @@ -28,8 +28,7 @@ */ public class CallPeerMenu extends SIPCommMenu - implements CallPeerListener, - PropertyChangeListener + implements CallPeerListener { private final CallPeer callPeer; @@ -45,8 +44,6 @@ public class CallPeerMenu private final String unmuteText = GuiActivator.getResources() .getI18NString("service.gui.UNMUTE"); - private final JMenuItem muteMenuItem = new JMenuItem(muteText); - /** * Creates a CallPeerActionMenuBar by specifying the associated * callPeer. @@ -86,12 +83,6 @@ public void actionPerformed(ActionEvent e) // changes. We'll be using these notifications in order to update the // hold menu item state. peer.addCallPeerListener(this); - - /* Disable per peer muting - initMuteMenuItem(); - this.add(muteMenuItem); - peer.addPropertyChangeListener(this); - */ } /** @@ -118,30 +109,6 @@ public void actionPerformed(ActionEvent e) }); } - /** - * Initializes the mute menu item. - */ - private void initMuteMenuItem() - { - muteMenuItem.addActionListener( - new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - if (muteMenuItem.getText().equals(muteText)) - { - CallManager.mute(callPeer, true); - muteMenuItem.setText(unmuteText); - } - else - { - CallManager.mute(callPeer, false); - muteMenuItem.setText(muteText); - } - } - }); - } - /** * Implements {@link CallPeerListener#peerStateChanged * (CallPeerChangeEvent)} @@ -174,28 +141,4 @@ public void peerDisplayNameChanged(CallPeerChangeEvent evt) {} public void peerImageChanged(CallPeerChangeEvent evt) {} public void peerTransportAddressChanged(CallPeerChangeEvent evt) {} - - /** - * Implements - * {@link PropertyChangeListener#propertyChange(PropertyChangeEvent)} - * in order to update the "Mute/Unmute" menu item to fit the current state - * of the mute property for this call peer. - * - * @param evt the PropertyChangeEvent that notified us of the - * property change - */ - public void propertyChange(PropertyChangeEvent evt) - { - String propertyName = evt.getPropertyName(); - - if (propertyName.equals(CallPeer.MUTE_PROPERTY_NAME)) - { - boolean isMute = (Boolean) evt.getNewValue(); - - if (isMute) - muteMenuItem.setText(unmuteText); - else - muteMenuItem.setText(muteText); - } - } } diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java index d78ef6c07..1ca3f0e5a 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java @@ -1513,26 +1513,6 @@ public synchronized void shutdown() } } - /** - * Sets the mute state of the audio stream being sent to a specific - * CallPeer. - *

- * The implementation sends silence through the audio stream. - *

- * - * @param peer the CallPeer who receives the audio stream to have - * its mute state set - * @param mute true to mute the audio stream being sent to - * peer; otherwise, false - */ - @Override - public void setMute(CallPeer peer, boolean mute) - { - CallPeerSipImpl sipPeer = (CallPeerSipImpl) peer; - - sipPeer.setMute(mute); - } - /** * Sets the mute state of the Call. *

diff --git a/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java b/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java index 683c8a4e3..fbd7278fa 100644 --- a/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java @@ -102,27 +102,6 @@ public void removeCallListener(CallListener listener) } } - /** - * Sets the mute state of the audio stream being sent to a specific - * CallPeer. - *

- * The default implementation does nothing. - *

- * - * @param peer the CallPeer who receives the audio - * stream to have its mute state set - * @param mute true to mute the audio stream being sent to - * peer; otherwise, false - */ - public void setMute(CallPeer peer, boolean mute) - { - /* - * While throwing UnsupportedOperationException may be a possible - * approach, putOnHold/putOffHold just do nothing when not supported so - * this implementation takes inspiration from them. - */ - } - /** * Sets the mute state of the Call. *

diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java b/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java index 911a45564..9a7540a30 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java @@ -135,21 +135,6 @@ public void hangupCallPeer(CallPeer peer) */ public Iterator getActiveCalls(); - /** - * Sets the mute state of the audio stream being sent to a specific - * CallPeer. - *

- * Muting an audio stream is implementation specific and one of the possible - * approaches to it is sending silence. - *

- * - * @param peer the CallPeer who receives the audio - * stream to have its mute state set - * @param mute true to mute the audio stream being sent to - * peer; otherwise, false - */ - public void setMute(CallPeer peer, boolean mute); - /** * Sets the mute state of the Call. *