Add initial support for send/receive on CDN2.

This commit is contained in:
Ehren Kret
2020-04-05 17:32:06 -07:00
committed by Greyson Parrelli
parent 1290d0ead9
commit 37a35e8f70
32 changed files with 510 additions and 144 deletions

View File

@@ -54,6 +54,7 @@ public final class FeatureFlags {
private static final String PINS_MEGAPHONE_KILL_SWITCH = "android.pinsMegaphoneKillSwitch";
private static final String PROFILE_NAMES_MEGAPHONE = "android.profileNamesMegaphone";
private static final String STORAGE_SERVICE = "android.storageService.2";
private static final String ATTACHMENTS_V3 = "android.attachmentsV3";
/**
* We will only store remote values for flags in this set. If you want a flag to be controllable
@@ -66,7 +67,8 @@ public final class FeatureFlags {
PINS_MEGAPHONE_KILL_SWITCH,
PROFILE_NAMES_MEGAPHONE,
MESSAGE_REQUESTS,
STORAGE_SERVICE
STORAGE_SERVICE,
ATTACHMENTS_V3
);
/**
@@ -88,7 +90,8 @@ public final class FeatureFlags {
*/
private static final Set<String> HOT_SWAPPABLE = Sets.newHashSet(
PINS_MEGAPHONE_KILL_SWITCH,
STORAGE_SERVICE
STORAGE_SERVICE,
ATTACHMENTS_V3
);
/**
@@ -213,6 +216,11 @@ public final class FeatureFlags {
return getValue(STORAGE_SERVICE, false);
}
/** Whether or not we use the attachments v3 form. */
public static boolean attachmentsV3() {
return getValue(ATTACHMENTS_V3, false);
}
/** Only for rendering debug info. */
public static synchronized @NonNull Map<String, Boolean> getMemoryValues() {
return new TreeMap<>(REMOTE_VALUES);