diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-02-12 19:43:24 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-02-12 19:43:24 +0100 |
commit | 7c49e47659897c80d7e1b5998c66a7caa97fedc6 (patch) | |
tree | 6f7e7e1b2da19ba20c131639e1ad19614435c9f3 /src/main/java/de/pixart/messenger/persistance | |
parent | 97f529643800dcfe3f7fc996f155dedc36b793a2 (diff) |
don't compress videos if they are in our files directory
Diffstat (limited to 'src/main/java/de/pixart/messenger/persistance')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/FileBackend.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index d670c98d9..e2d339841 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -261,6 +261,18 @@ public class FileBackend { } } + public boolean useFileAsIs(Uri uri) { + String path = getOriginalPath(uri); + if (path == null) { + return false; + } + if (path.contains(getConversationsDirectory("null"))) { + Log.d(Config.LOGTAG, "File " + path + " is in our directory, sending as is"); + return true; + } + return false; + } + public String getOriginalPath(Uri uri) { return FileUtils.getPath(mXmppConnectionService, uri); } |