aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-09-25 20:40:38 +0200
committerChristian Schneppe <christian@pix-art.de>2017-09-25 20:40:38 +0200
commit2c624bfeda4f65eed19078453d071d432753a253 (patch)
tree4778d4a09c0d6bcdd8f6c4b6435f7fa153305881 /src/main
parent05a155d3d8ff3d80b888b1307c7ccb693118c010 (diff)
don't recompress videos which were sent/received before
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/persistance/FileBackend.java2
-rw-r--r--src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
index 7be0492bb..727892af0 100644
--- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java
+++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
@@ -278,7 +278,7 @@ public class FileBackend {
}
public boolean useFileAsIs(Uri uri) {
- String path = uri.getPath();
+ String path = getOriginalPath(uri);
if (path == null) {
return false;
}
diff --git a/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java b/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java
index e7dde2f84..119670453 100644
--- a/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java
+++ b/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java
@@ -39,7 +39,7 @@ public class AttachFileToConversationRunnable implements Runnable, MediaTranscod
this.message = message;
this.callback = callback;
final String mimeType = MimeUtils.guessMimeTypeFromUri(mXmppConnectionService, uri);
- this.isVideoMessage = (mimeType != null && mimeType.startsWith("video/") && (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 || !getFileBackend().useFileAsIs(uri)));
+ this.isVideoMessage = (mimeType != null && mimeType.startsWith("video/") && (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)) && !getFileBackend().useFileAsIs(uri);
}
public boolean isVideoMessage() {