Put send viewed receipts behind a feature flag.

This commit is contained in:
Cody Henthorne
2020-12-02 20:15:26 -05:00
parent cf7fb7e1a2
commit 25bffa6d56
2 changed files with 10 additions and 2 deletions

View File

@@ -63,6 +63,7 @@ public final class FeatureFlags {
private static final String GV1_AUTO_MIGRATE = "android.groupsV1Migration.auto.3";
private static final String GV1_MANUAL_MIGRATE = "android.groupsV1Migration.manual";
private static final String GV1_FORCED_MIGRATE = "android.groupsV1Migration.forced";
private static final String SEND_VIEWED_RECEIPTS = "android.sendViewedReceipts";
/**
* We will only store remote values for flags in this set. If you want a flag to be controllable
@@ -81,7 +82,8 @@ public final class FeatureFlags {
GV1_AUTO_MIGRATE,
GV1_MANUAL_MIGRATE,
GV1_FORCED_MIGRATE,
GROUP_CALLING
GROUP_CALLING,
SEND_VIEWED_RECEIPTS
);
/**
@@ -244,6 +246,11 @@ public final class FeatureFlags {
return getBoolean(GV1_FORCED_MIGRATE, false) && groupsV1ManualMigration() && groupsV1AutoMigration();
}
/** Whether or not to send viewed receipts. */
public static boolean sendViewedReceipts() {
return getBoolean(SEND_VIEWED_RECEIPTS, false);
}
/** Only for rendering debug info. */
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
return new TreeMap<>(REMOTE_VALUES);