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/services | |
parent | c5c8ba4f31cf949d242280e09ec4e50f0be59a13 (diff) |
show resource prompt when sending uncompressed video
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java b/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java index a56d3cea2..bb907a5cd 100644 --- a/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java +++ b/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java @@ -1,11 +1,15 @@ package de.pixart.messenger.services; +import android.content.Context; +import android.content.SharedPreferences; import android.net.Uri; import android.os.Build; import android.os.ParcelFileDescriptor; -import androidx.annotation.RequiresApi; +import android.preference.PreferenceManager; import android.util.Log; +import androidx.annotation.RequiresApi; + import net.ypresto.androidtranscoder.MediaTranscoder; import net.ypresto.androidtranscoder.format.MediaFormatStrategyPresets; @@ -178,6 +182,15 @@ public class AttachFileToConversationRunnable implements Runnable, MediaTranscod } } + private String getVideoCompression() { + return getVideoCompression(mXmppConnectionService); + } + + public static String getVideoCompression(final Context context) { + final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); + return preferences.getString("video_compression", context.getResources().getString(R.string.video_compression)); + } + public FileBackend getFileBackend() { return mXmppConnectionService.fileBackend; } |