diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-01-19 23:35:29 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-01-19 23:35:29 +0100 |
commit | 47ec6c5fdd2cbf28bac0433dfc5198f06d20747e (patch) | |
tree | 3bdf506d4af0ffa7ddc869d628c0ec8e52ca97e2 /src/main/java/de/pixart/messenger/services | |
parent | 26320c785a09c66329cb54b07f0dde791059efac (diff) |
rewrite isVideoMessage logic and add some more logging
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java b/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java index 3f15fb883..4ad16838c 100644 --- a/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java +++ b/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java @@ -44,10 +44,11 @@ public class AttachFileToConversationRunnable implements Runnable, MediaTranscod final String mimeType = MimeUtils.guessMimeTypeFromUri(mXmppConnectionService, uri); final int autoAcceptFileSize = Config.FILE_SIZE; this.originalFileSize = FileBackend.getFileSize(mXmppConnectionService, uri); - this.isVideoMessage = (mimeType != null && mimeType.startsWith("video/") + this.isVideoMessage = !getFileBackend().useFileAsIs(uri) + && (mimeType != null && mimeType.startsWith("video/") && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) - && originalFileSize > autoAcceptFileSize - && !getFileBackend().useFileAsIs(uri); + && originalFileSize > autoAcceptFileSize; + } public boolean isVideoMessage() { |