Add CFv2 feature flag.

This commit is contained in:
Cody Henthorne
2023-07-14 10:40:33 -04:00
committed by Nicholas Tinsley
parent 6a443d0074
commit fe509838f4
9 changed files with 27 additions and 42 deletions

View File

@@ -107,6 +107,7 @@ public final class FeatureFlags {
private static final String MAX_ATTACHMENT_SIZE_BYTES = "global.attachments.maxBytes";
private static final String SVR2_KILLSWITCH = "android.svr2.killSwitch";
private static final String CDS_COMPAT_MODE = "global.cds.return_acis_without_uaks";
private static final String CONVERSATION_FRAGMENT_V2 = "android.conversationFragmentV2";
/**
* We will only store remote values for flags in this set. If you want a flag to be controllable
@@ -165,7 +166,8 @@ public final class FeatureFlags {
MAX_ATTACHMENT_SIZE_BYTES,
AD_HOC_CALLING,
SVR2_KILLSWITCH,
CDS_COMPAT_MODE
CDS_COMPAT_MODE,
CONVERSATION_FRAGMENT_V2
);
@VisibleForTesting
@@ -230,7 +232,8 @@ public final class FeatureFlags {
MAX_ATTACHMENT_RECEIVE_SIZE_BYTES,
MAX_ATTACHMENT_SIZE_BYTES,
SVR2_KILLSWITCH,
CDS_COMPAT_MODE
CDS_COMPAT_MODE,
CONVERSATION_FRAGMENT_V2
);
/**
@@ -592,6 +595,11 @@ public final class FeatureFlags {
return getBoolean(CDS_COMPAT_MODE, true);
}
/** True if the new conversation fragment should be used. */
public static boolean useConversationFragmentV2() {
return getBoolean(CONVERSATION_FRAGMENT_V2, false);
}
/** Only for rendering debug info. */
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
return new TreeMap<>(REMOTE_VALUES);