Add new APNG renderer, just for internal users for now.

This commit is contained in:
Greyson Parrelli
2024-02-02 10:08:08 -05:00
committed by Cody Henthorne
parent 34d87cf6e1
commit c3f9e5d972
151 changed files with 2425 additions and 13 deletions

View File

@@ -12,6 +12,7 @@ import androidx.annotation.RequiresApi;
import org.signal.core.util.logging.Log;
import org.thoughtcrime.securesms.dependencies.AppDependencies;
import org.thoughtcrime.securesms.keyvalue.SignalStore;
/**
* Easy access to various properties of the device, typically to make performance-related decisions.
@@ -25,6 +26,10 @@ public final class DeviceProperties {
* large numbers of APNGs simultaneously.
*/
public static boolean shouldAllowApngStickerAnimation(@NonNull Context context) {
if (SignalStore.labs().getNewApngRenderer()) {
return true;
}
MemoryInfo memoryInfo = getMemoryInfo(context);
int memoryMb = (int) ByteUnit.BYTES.toMegabytes(memoryInfo.totalMem);