From 8838a5094812e0540ccfef3334e49e1a5c1a564b Mon Sep 17 00:00:00 2001 From: steckbrief Date: Fri, 6 Nov 2015 20:23:43 +0100 Subject: FileBackend splitted into several util classes for separate concerns: AvatarUtil, StreamUtil, ImageUtil. Unused imports removed. --- .../thedevstack/conversationsplus/http/HttpDownloadConnection.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java') diff --git a/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java b/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java index b7f3cc67..b958e57e 100644 --- a/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java +++ b/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java @@ -22,6 +22,7 @@ import de.thedevstack.conversationsplus.R; import de.thedevstack.conversationsplus.entities.Transferable; import de.thedevstack.conversationsplus.entities.DownloadableFile; import de.thedevstack.conversationsplus.entities.Message; +import de.thedevstack.conversationsplus.persistance.FileBackend; import de.thedevstack.conversationsplus.services.XmppConnectionService; import de.thedevstack.conversationsplus.utils.CryptoHelper; @@ -81,7 +82,7 @@ public class HttpDownloadConnection implements Transferable { extension = lastPart; } message.setRelativeFilePath(message.getUuid()+"."+extension); - this.file = mXmppConnectionService.getFileBackend().getFile(message, false); + this.file = FileBackend.getFile(message, false); String reference = mUrl.getRef(); if (reference != null && reference.length() == 96) { this.file.setKey(CryptoHelper.hexToBytes(reference)); @@ -235,7 +236,7 @@ public class HttpDownloadConnection implements Transferable { private void updateImageBounds() { message.setType(Message.TYPE_FILE); - mXmppConnectionService.getFileBackend().updateFileParams(message, mUrl); + FileBackend.updateFileParams(message, mUrl); mXmppConnectionService.updateMessage(message); } -- cgit v1.2.3