kopia lustrzana https://github.com/ryukoposting/Signal-Android
Inline MP4 GIF flag.
rodzic
520fe481e9
commit
e2e0caa94a
|
@ -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();
|
||||
|
|
|
@ -37,7 +37,7 @@ public class GifSlide extends ImageSlide {
|
|||
null,
|
||||
false,
|
||||
borderless,
|
||||
FeatureFlags.mp4GifSendSupport(),
|
||||
true,
|
||||
false));
|
||||
|
||||
this.borderless = borderless;
|
||||
|
|
|
@ -74,7 +74,6 @@ public final class FeatureFlags {
|
|||
private static final String ANIMATED_STICKER_MIN_TOTAL_MEMORY = "android.animatedStickerMinTotalMemory";
|
||||
private static final String MESSAGE_PROCESSOR_ALARM_INTERVAL = "android.messageProcessor.alarmIntervalMins";
|
||||
private static final String MESSAGE_PROCESSOR_DELAY = "android.messageProcessor.foregroundDelayMs";
|
||||
private static final String MP4_GIF_SEND_SUPPORT = "android.mp4GifSendSupport.2";
|
||||
private static final String MEDIA_QUALITY_LEVELS = "android.mediaQuality.levels";
|
||||
private static final String RETRY_RECEIPT_LIFESPAN = "android.retryReceiptLifespan";
|
||||
private static final String RETRY_RESPOND_MAX_AGE = "android.retryRespondMaxAge";
|
||||
|
@ -112,7 +111,6 @@ public final class FeatureFlags {
|
|||
ANIMATED_STICKER_MIN_TOTAL_MEMORY,
|
||||
MESSAGE_PROCESSOR_ALARM_INTERVAL,
|
||||
MESSAGE_PROCESSOR_DELAY,
|
||||
MP4_GIF_SEND_SUPPORT,
|
||||
MEDIA_QUALITY_LEVELS,
|
||||
RETRY_RECEIPT_LIFESPAN,
|
||||
RETRY_RESPOND_MAX_AGE,
|
||||
|
@ -164,7 +162,6 @@ public final class FeatureFlags {
|
|||
ANIMATED_STICKER_MIN_TOTAL_MEMORY,
|
||||
MESSAGE_PROCESSOR_ALARM_INTERVAL,
|
||||
MESSAGE_PROCESSOR_DELAY,
|
||||
MP4_GIF_SEND_SUPPORT,
|
||||
MEDIA_QUALITY_LEVELS,
|
||||
RETRY_RECEIPT_LIFESPAN,
|
||||
RETRY_RESPOND_MAX_AGE,
|
||||
|
@ -351,10 +348,6 @@ public final class FeatureFlags {
|
|||
return getInteger(ANIMATED_STICKER_MIN_TOTAL_MEMORY, (int) ByteUnit.GIGABYTES.toMegabytes(3));
|
||||
}
|
||||
|
||||
public static boolean mp4GifSendSupport() {
|
||||
return getBoolean(MP4_GIF_SEND_SUPPORT, false);
|
||||
}
|
||||
|
||||
public static @NonNull String getMediaQualityLevels() {
|
||||
return getString(MEDIA_QUALITY_LEVELS, "");
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue