diff options
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/xmpp')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleConnection.java | 14 | ||||
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleConnectionManager.java | 3 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleConnection.java b/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleConnection.java index b4c05ce4..422bdff0 100644 --- a/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleConnection.java +++ b/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleConnection.java @@ -103,7 +103,7 @@ public class JingleConnection implements Transferable { sendSuccess(); MessageUtil.updateFileParams(message); mXmppConnectionService.databaseBackend.createMessage(message); - mXmppConnectionService.markMessage(message,Message.STATUS_RECEIVED); + MessageUtil.markMessage(message,Message.STATUS_RECEIVED); if (acceptedAutomatically) { message.markUnread(); JingleConnection.this.mXmppConnectionService.getNotificationService().push(message); @@ -457,7 +457,7 @@ public class JingleConnection implements Transferable { if (packet.getType() == IqPacket.TYPE.RESULT) { Logging.d(Config.LOGTAG,account.getJid().toBareJid()+": other party received offer"); mJingleStatus = JINGLE_STATUS_INITIATED; - mXmppConnectionService.markMessage(message, Message.STATUS_OFFERED); + MessageUtil.markMessage(message, Message.STATUS_OFFERED); } else { fail(); } @@ -548,7 +548,7 @@ public class JingleConnection implements Transferable { mergeCandidates(JingleCandidate.parse(content.socks5transport() .getChildren())); this.mJingleStatus = JINGLE_STATUS_ACCEPTED; - mXmppConnectionService.markMessage(message, Message.STATUS_UNSEND); + MessageUtil.markMessage(message, Message.STATUS_UNSEND); this.connectNextCandidate(); return true; } @@ -780,7 +780,7 @@ public class JingleConnection implements Transferable { private void receiveSuccess() { this.mJingleStatus = JINGLE_STATUS_FINISHED; - this.mXmppConnectionService.markMessage(this.message,Message.STATUS_SEND_RECEIVED); + MessageUtil.markMessage(this.message,Message.STATUS_SEND_RECEIVED); this.disconnectSocks5Connections(); if (this.transport != null && this.transport instanceof JingleInbandTransport) { this.transport.disconnect(); @@ -803,8 +803,7 @@ public class JingleConnection implements Transferable { } this.mXmppConnectionService.updateConversationUi(); } else { - this.mXmppConnectionService.markMessage(this.message, - Message.STATUS_SEND_FAILED); + MessageUtil.markMessage(this.message, Message.STATUS_SEND_FAILED); this.message.setTransferable(null); } } @@ -825,8 +824,7 @@ public class JingleConnection implements Transferable { } this.mXmppConnectionService.updateConversationUi(); } else { - this.mXmppConnectionService.markMessage(this.message, - Message.STATUS_SEND_FAILED); + MessageUtil.markMessage(this.message, Message.STATUS_SEND_FAILED); this.message.setTransferable(null); } } diff --git a/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleConnectionManager.java b/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleConnectionManager.java index 3284a936..2deb79c6 100644 --- a/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleConnectionManager.java +++ b/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleConnectionManager.java @@ -15,6 +15,7 @@ import de.thedevstack.conversationsplus.entities.Message; import de.thedevstack.conversationsplus.entities.Transferable; import de.thedevstack.conversationsplus.services.AbstractConnectionManager; import de.thedevstack.conversationsplus.services.XmppConnectionService; +import de.thedevstack.conversationsplus.utils.MessageUtil; import de.thedevstack.conversationsplus.utils.Xmlns; import de.thedevstack.conversationsplus.xml.Element; import de.thedevstack.conversationsplus.xmpp.OnIqPacketReceived; @@ -65,7 +66,7 @@ public class JingleConnectionManager extends AbstractConnectionManager { old.cancel(); } JingleConnection connection = new JingleConnection(this); - mXmppConnectionService.markMessage(message,Message.STATUS_WAITING); + MessageUtil.markMessage(message,Message.STATUS_WAITING); connection.init(message); this.connections.add(connection); return connection; |