aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java b/src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java
index a9682718..05d3a129 100644
--- a/src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java
+++ b/src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java
@@ -21,6 +21,7 @@ import de.thedevstack.conversationsplus.persistance.FileBackend;
import de.thedevstack.conversationsplus.services.XmppConnectionService;
import de.thedevstack.conversationsplus.ui.UiCallback;
import de.thedevstack.conversationsplus.utils.CryptoHelper;
+import de.thedevstack.conversationsplus.utils.StreamUtil;
import de.thedevstack.conversationsplus.utils.Xmlns;
import de.thedevstack.conversationsplus.xml.Element;
import de.thedevstack.conversationsplus.xmpp.OnIqPacketReceived;
@@ -85,7 +86,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 +164,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 +194,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();
}