diff options
author | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-09-29 14:18:14 +0200 |
---|---|---|
committer | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-09-29 14:18:14 +0200 |
commit | d852745b2ca59610a0b8f2271545befd697ec7a8 (patch) | |
tree | 130d83cd5966d82ff7b6307de62745bfc1c355cd /src/main/java/de/pixart/messenger/persistance | |
parent | c5c8ba4f31cf949d242280e09ec4e50f0be59a13 (diff) |
show resource prompt when sending uncompressed video
Diffstat (limited to 'src/main/java/de/pixart/messenger/persistance')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/FileBackend.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index 274b84c08..e34cb9074 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -60,6 +60,7 @@ import de.pixart.messenger.Config; import de.pixart.messenger.R; import de.pixart.messenger.entities.DownloadableFile; import de.pixart.messenger.entities.Message; +import de.pixart.messenger.services.AttachFileToConversationRunnable; import de.pixart.messenger.services.XmppConnectionService; import de.pixart.messenger.ui.util.Attachment; import de.pixart.messenger.utils.CryptoHelper; @@ -271,6 +272,7 @@ public class FileBackend { } public static boolean allFilesUnderSize(Context context, List<Attachment> attachments, long max) { + final boolean compressVideo = !AttachFileToConversationRunnable.getVideoCompression(context).equals("uncompressed"); if (max <= 0) { Log.d(Config.LOGTAG, "server did not report max file size for http upload"); return true; //exception to be compatible with HTTP Upload < v0.2 @@ -280,7 +282,7 @@ public class FileBackend { continue; } String mime = attachment.getMime(); - if (mime != null && mime.startsWith("video/")) { + if (mime != null && mime.startsWith("video/") && compressVideo) { try { Dimensions dimensions = FileBackend.getVideoDimensions(context, attachment.getUri()); if (dimensions.getMin() >= 720) { |