mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 18:30:20 +01:00
Control CDS refresh interval with a feature flag.
This commit is contained in:
@@ -66,6 +66,7 @@ public final class FeatureFlags {
|
||||
private static final String GV1_MIGRATION_JOB = "android.groupsV1Migration.job";
|
||||
private static final String SEND_VIEWED_RECEIPTS = "android.sendViewedReceipts";
|
||||
private static final String CUSTOM_VIDEO_MUXER = "android.customVideoMuxer";
|
||||
private static final String CDS_REFRESH_INTERVAL = "cds.syncInterval.seconds";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
@@ -87,7 +88,8 @@ public final class FeatureFlags {
|
||||
GV1_FORCED_MIGRATE,
|
||||
GROUP_CALLING,
|
||||
SEND_VIEWED_RECEIPTS,
|
||||
CUSTOM_VIDEO_MUXER
|
||||
CUSTOM_VIDEO_MUXER,
|
||||
CDS_REFRESH_INTERVAL
|
||||
);
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -119,7 +121,8 @@ public final class FeatureFlags {
|
||||
CLIENT_EXPIRATION,
|
||||
GROUP_CALLING,
|
||||
GV1_MIGRATION_JOB,
|
||||
CUSTOM_VIDEO_MUXER
|
||||
CUSTOM_VIDEO_MUXER,
|
||||
CDS_REFRESH_INTERVAL
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -270,6 +273,11 @@ public final class FeatureFlags {
|
||||
return getBoolean(CUSTOM_VIDEO_MUXER, false);
|
||||
}
|
||||
|
||||
/** The time in between routine CDS refreshes, in seconds. */
|
||||
public static int cdsRefreshIntervalSeconds() {
|
||||
return getInteger(CDS_REFRESH_INTERVAL, (int) TimeUnit.HOURS.toSeconds(48));
|
||||
}
|
||||
|
||||
/** Only for rendering debug info. */
|
||||
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
||||
return new TreeMap<>(REMOTE_VALUES);
|
||||
|
||||
Reference in New Issue
Block a user