Inline MP4 GIF flag.

This reverts commit 91645e6adc.
This commit is contained in:
Greyson Parrelli
2021-09-28 17:01:27 -04:00
committed by Cody Henthorne
parent f3d0b4a671
commit 3310246351
4 changed files with 4 additions and 19 deletions

View File

@@ -13,10 +13,6 @@ public final class GiphyMp4PlaybackPolicy {
private GiphyMp4PlaybackPolicy() { }
public static boolean sendAsMp4() {
return FeatureFlags.mp4GifSendSupport();
}
public static boolean autoplay() {
return !DeviceProperties.isLowMemoryDevice(ApplicationDependencies.getApplication());
}

View File

@@ -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();