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 | |
parent | 1927a3d99c3a8e23535680ceb29e7dbb78bda185 (diff) |
refactored file download status. make image http download available for carbon copied (sent) messages as well
Diffstat (limited to 'src/eu/siacs/conversations/persistance')
-rw-r--r-- | src/eu/siacs/conversations/persistance/DatabaseBackend.java | 2 | ||||
-rw-r--r-- | src/eu/siacs/conversations/persistance/FileBackend.java | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/eu/siacs/conversations/persistance/DatabaseBackend.java index 091c00bd..d90b5c62 100644 --- a/src/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -238,7 +238,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { cursor.close(); return (count > 0); } catch (SQLiteCantOpenDatabaseException e) { - return true; //better safe than sorry + return true; // better safe than sorry } } diff --git a/src/eu/siacs/conversations/persistance/FileBackend.java b/src/eu/siacs/conversations/persistance/FileBackend.java index c8ae657d..35aa9042 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); |