From bff1ac5ebc0db303385166b83ae5181ca29a0d20 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 20 Jan 2024 11:41:37 +0100 Subject: [PATCH] do not nofiy UI if UI triggered retract --- .../xmpp/jingle/JingleConnectionManager.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java index d9389c506..4356a0686 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java @@ -659,12 +659,17 @@ public class JingleConnectionManager extends AbstractConnectionManager { } } if (matchingProposal != null) { - retractSessionProposal(matchingProposal); + retractSessionProposal(matchingProposal, false); } } } private void retractSessionProposal(final RtpSessionProposal rtpSessionProposal) { + retractSessionProposal(rtpSessionProposal, true); + } + + private void retractSessionProposal( + final RtpSessionProposal rtpSessionProposal, final boolean refresh) { final Account account = rtpSessionProposal.account; Log.d( Config.LOGTAG, @@ -673,11 +678,13 @@ public class JingleConnectionManager extends AbstractConnectionManager { + rtpSessionProposal.with); this.rtpSessionProposals.remove(rtpSessionProposal); rtpSessionProposal.callIntegration.retracted(); - mXmppConnectionService.notifyJingleRtpConnectionUpdate( - account, - rtpSessionProposal.with, - rtpSessionProposal.sessionId, - RtpEndUserState.RETRACTED); + if (refresh) { + mXmppConnectionService.notifyJingleRtpConnectionUpdate( + account, + rtpSessionProposal.with, + rtpSessionProposal.sessionId, + RtpEndUserState.RETRACTED); + } final MessagePacket messagePacket = mXmppConnectionService.getMessageGenerator().sessionRetract(rtpSessionProposal); writeLogMissedOutgoing(