aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/services/AttachFileToConversationRunnable.java15
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;
}