Render gifs in gif search as MP4s.

This commit is contained in:
Alex Hart
2021-04-14 16:44:03 -03:00
committed by Greyson Parrelli
parent fcc5db2fe6
commit c31146e902
94 changed files with 2062 additions and 273 deletions

View File

@@ -77,6 +77,7 @@ public final class FeatureFlags {
private static final String MESSAGE_PROCESSOR_DELAY = "android.messageProcessor.foregroundDelayMs";
private static final String STORAGE_SYNC_V2 = "android.storageSyncV2.3";
private static final String NOTIFICATION_REWRITE = "android.notificationRewrite";
private static final String MP4_GIF_SEND_SUPPORT = "android.mp4GifSendSupport";
/**
* We will only store remote values for flags in this set. If you want a flag to be controllable
@@ -109,7 +110,8 @@ public final class FeatureFlags {
MESSAGE_PROCESSOR_ALARM_INTERVAL,
MESSAGE_PROCESSOR_DELAY,
STORAGE_SYNC_V2,
NOTIFICATION_REWRITE
NOTIFICATION_REWRITE,
MP4_GIF_SEND_SUPPORT
);
@VisibleForTesting
@@ -154,7 +156,8 @@ public final class FeatureFlags {
MESSAGE_PROCESSOR_DELAY,
GV1_FORCED_MIGRATE,
STORAGE_SYNC_V2,
NOTIFICATION_REWRITE
NOTIFICATION_REWRITE,
MP4_GIF_SEND_SUPPORT
);
/**
@@ -351,6 +354,10 @@ public final class FeatureFlags {
return getBoolean(NOTIFICATION_REWRITE, false) && Build.VERSION.SDK_INT >= 26;
}
public static boolean mp4GifSendSupport() {
return getBoolean(MP4_GIF_SEND_SUPPORT, false);
}
/** Only for rendering debug info. */
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
return new TreeMap<>(REMOTE_VALUES);