aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/services
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-02-12 19:43:24 +0100
committerChristian Schneppe <christian@pix-art.de>2017-02-12 19:43:24 +0100
commit7c49e47659897c80d7e1b5998c66a7caa97fedc6 (patch)
tree6f7e7e1b2da19ba20c131639e1ad19614435c9f3 /src/main/java/de/pixart/messenger/services
parent97f529643800dcfe3f7fc996f155dedc36b793a2 (diff)
don't compress videos if they are in our files directory
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 8722bc3b7..752e65cfb 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -562,10 +562,14 @@ public class XmppConnectionService extends Service {
public void run() {
final String mimeType = MimeUtils.guessMimeTypeFromUri(XmppConnectionService.this, uri);
if (mimeType != null && mimeType.startsWith("video/") && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
- try {
- processAsVideo();
- } catch (Throwable e) {
+ if (getFileBackend().useFileAsIs(uri)) {
processAsFile();
+ } else {
+ try {
+ processAsVideo();
+ } catch (Throwable e) {
+ processAsFile();
+ }
}
} else {
processAsFile();