diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-10-15 19:32:12 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-10-15 19:32:12 +0200 |
commit | cb4069f0f213ed1a38ce074d981b0c367dc2cdfd (patch) | |
tree | 9004af99e6da679e640fe97bdcdbf469832b8ab5 /src/eu/siacs/conversations/persistance/FileBackend.java | |
parent | 1927a3d99c3a8e23535680ceb29e7dbb78bda185 (diff) |
refactored file download status. make image http download available for carbon copied (sent) messages as well
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/persistance/FileBackend.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/eu/siacs/conversations/persistance/FileBackend.java b/src/eu/siacs/conversations/persistance/FileBackend.java index c8ae657d9..35aa9042b 100644 --- a/src/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/eu/siacs/conversations/persistance/FileBackend.java @@ -70,7 +70,8 @@ public class FileBackend { return getJingleFileLegacy(message, true); } - public DownloadableFile getJingleFileLegacy(Message message, boolean decrypted) { + public DownloadableFile getJingleFileLegacy(Message message, + boolean decrypted) { Conversation conversation = message.getConversation(); String prefix = context.getFilesDir().getAbsolutePath(); String path = prefix + "/" + conversation.getAccount().getJid() + "/" @@ -92,7 +93,8 @@ public class FileBackend { return getConversationsFile(message, true); } - public DownloadableFile getConversationsFile(Message message, boolean decrypted) { + public DownloadableFile getConversationsFile(Message message, + boolean decrypted) { StringBuilder filename = new StringBuilder(); filename.append(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES).getAbsolutePath()); @@ -144,8 +146,8 @@ public class FileBackend { return this.copyImageToPrivateStorage(message, image, 0); } - private DownloadableFile copyImageToPrivateStorage(Message message, Uri image, - int sampleSize) throws ImageCopyException { + private DownloadableFile copyImageToPrivateStorage(Message message, + Uri image, int sampleSize) throws ImageCopyException { try { InputStream is = context.getContentResolver() .openInputStream(image); |