mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Inline MP4 GIF flag.
This commit is contained in:
@@ -21,10 +21,6 @@ public final class GiphyMp4PlaybackPolicy {
|
||||
|
||||
private GiphyMp4PlaybackPolicy() { }
|
||||
|
||||
public static boolean sendAsMp4() {
|
||||
return FeatureFlags.mp4GifSendSupport();
|
||||
}
|
||||
|
||||
public static boolean autoplay() {
|
||||
return !DeviceProperties.isLowMemoryDevice(ApplicationDependencies.getApplication());
|
||||
}
|
||||
|
||||
@@ -51,19 +51,15 @@ final class GiphyMp4Repository {
|
||||
|
||||
@WorkerThread
|
||||
private @NonNull Uri saveToBlobInternal(@NonNull GiphyImage giphyImage, boolean isForMms) throws IOException {
|
||||
boolean sendAsMp4 = GiphyMp4PlaybackPolicy.sendAsMp4();
|
||||
String url;
|
||||
String mime;
|
||||
|
||||
if (sendAsMp4) {
|
||||
url = giphyImage.getMp4Url();
|
||||
mime = MediaUtil.VIDEO_MP4;
|
||||
} else if (isForMms) {
|
||||
if (isForMms) {
|
||||
url = giphyImage.getGifMmsUrl();
|
||||
mime = MediaUtil.IMAGE_GIF;
|
||||
} else {
|
||||
url = giphyImage.getGifUrl();
|
||||
mime = MediaUtil.IMAGE_GIF;
|
||||
url = giphyImage.getMp4Url();
|
||||
mime = MediaUtil.VIDEO_MP4;
|
||||
}
|
||||
|
||||
Request request = new Request.Builder().url(url).build();
|
||||
|
||||
Reference in New Issue
Block a user