From 5c20a67e6687cd700e2c19291d1829254c043e07 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 15 Jan 2017 11:46:20 +0100 Subject: only call UI thread from downloading thread every 250ms --- .../java/de/pixart/messenger/xmpp/jingle/JingleConnection.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java') diff --git a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java index 29b9db382..c95359663 100644 --- a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java @@ -392,7 +392,7 @@ public class JingleConnection implements Transferable { long size = Long.parseLong(fileSize.getContent()); message.setBody(Long.toString(size)); conversation.add(message); - mXmppConnectionService.updateConversationUi(); + mJingleConnectionManager.updateConversationUi(true); if (mJingleConnectionManager.hasStoragePermission() && size < this.mJingleConnectionManager.getAutoAcceptFileSize() && mXmppConnectionService.isDataSaverDisabled()) { @@ -514,7 +514,7 @@ public class JingleConnection implements Transferable { private void sendAccept() { mJingleStatus = JINGLE_STATUS_ACCEPTED; this.mStatus = Transferable.STATUS_DOWNLOADING; - mXmppConnectionService.updateConversationUi(); + this.mJingleConnectionManager.updateConversationUi(true); this.mJingleConnectionManager.getPrimaryCandidate(this.account, new OnPrimaryCandidateFound() { @Override public void onPrimaryCandidateFound(boolean success, final JingleCandidate candidate) { @@ -846,7 +846,7 @@ public class JingleConnection implements Transferable { if (this.file != null) { file.delete(); } - this.mXmppConnectionService.updateConversationUi(); + this.mJingleConnectionManager.updateConversationUi(true); } else { this.mXmppConnectionService.markMessage(this.message, Message.STATUS_SEND_FAILED); @@ -872,7 +872,7 @@ public class JingleConnection implements Transferable { if (this.file != null) { file.delete(); } - this.mXmppConnectionService.updateConversationUi(); + this.mJingleConnectionManager.updateConversationUi(true); } else { this.mXmppConnectionService.markMessage(this.message, Message.STATUS_SEND_FAILED, @@ -1020,7 +1020,7 @@ public class JingleConnection implements Transferable { public void updateProgress(int i) { this.mProgress = i; - mXmppConnectionService.updateConversationUi(); + mJingleConnectionManager.updateConversationUi(false); } public String getTransportId() { -- cgit v1.2.3