diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java index a3ab8dab..1fee4e58 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java @@ -12,6 +12,8 @@ import java.net.URL; import javax.net.ssl.HttpsURLConnection; +import de.thedevstack.conversationsplus.utils.StreamUtil; + import eu.siacs.conversations.Config; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Transferable; @@ -85,7 +87,7 @@ public class HttpUploadConnection implements Transferable { message.setTransferable(this); mXmppConnectionService.markMessage(message,Message.STATUS_UNSEND); this.account = message.getConversation().getAccount(); - this.file = mXmppConnectionService.getFileBackend().getFile(message, false); + this.file = FileBackend.getFile(message, false); this.file.setExpectedSize(this.file.getSize()); if (Config.ENCRYPT_ON_HTTP_UPLOADED) { @@ -163,7 +165,7 @@ public class HttpUploadConnection implements Transferable { if (key != null) { mGetUrl = new URL(mGetUrl.toString() + "#" + CryptoHelper.bytesToHex(key)); } - mXmppConnectionService.getFileBackend().updateFileParams(message, mGetUrl); + FileBackend.updateFileParams(message, mGetUrl); message.setTransferable(null); message.setCounterpart(message.getConversation().getJid().toBareJid()); if (message.getEncryption() == Message.ENCRYPTION_DECRYPTED) { @@ -193,8 +195,8 @@ public class HttpUploadConnection implements Transferable { Log.d(Config.LOGTAG, e.getMessage()); fail(); } finally { - FileBackend.close(is); - FileBackend.close(os); + StreamUtil.close(is); + StreamUtil.close(os); if (connection != null) { connection.disconnect(); } |