mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-21 18:26:57 +00:00
Ensure consistency and completeness of feature flag remote capable designation.
Make CustomVideoMuxer flag remote capable.
This commit is contained in:
@@ -65,13 +65,14 @@ public final class FeatureFlags {
|
||||
private static final String GV1_FORCED_MIGRATE = "android.groupsV1Migration.forced";
|
||||
private static final String GV1_MIGRATION_JOB = "android.groupsV1Migration.job";
|
||||
private static final String SEND_VIEWED_RECEIPTS = "android.sendViewedReceipts";
|
||||
private static final String DISABLE_CUSTOM_VIDEO_MUXER = "android.disableCustomVideoMuxer";
|
||||
private static final String CUSTOM_VIDEO_MUXER = "android.customVideoMuxer";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
* remotely, place it in here.
|
||||
*/
|
||||
private static final Set<String> REMOTE_CAPABLE = SetUtil.newHashSet(
|
||||
@VisibleForTesting
|
||||
static final Set<String> REMOTE_CAPABLE = SetUtil.newHashSet(
|
||||
GROUPS_V2_RECOMMENDED_LIMIT,
|
||||
GROUPS_V2_HARD_LIMIT,
|
||||
INTERNAL_USER,
|
||||
@@ -85,7 +86,13 @@ public final class FeatureFlags {
|
||||
GV1_MANUAL_MIGRATE,
|
||||
GV1_FORCED_MIGRATE,
|
||||
GROUP_CALLING,
|
||||
SEND_VIEWED_RECEIPTS
|
||||
SEND_VIEWED_RECEIPTS,
|
||||
CUSTOM_VIDEO_MUXER
|
||||
);
|
||||
|
||||
@VisibleForTesting
|
||||
static final Set<String> NOT_REMOTE_CAPABLE = SetUtil.newHashSet(
|
||||
PHONE_NUMBER_PRIVACY_VERSION
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -95,7 +102,8 @@ public final class FeatureFlags {
|
||||
* an addition to this map.
|
||||
*/
|
||||
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
|
||||
private static final Map<String, Object> FORCED_VALUES = new HashMap<String, Object>() {{
|
||||
@VisibleForTesting
|
||||
static final Map<String, Object> FORCED_VALUES = new HashMap<String, Object>() {{
|
||||
}};
|
||||
|
||||
/**
|
||||
@@ -105,20 +113,22 @@ public final class FeatureFlags {
|
||||
* will be updated arbitrarily at runtime. This will make values more responsive, but also places
|
||||
* more burden on the reader to ensure that the app experience remains consistent.
|
||||
*/
|
||||
private static final Set<String> HOT_SWAPPABLE = SetUtil.newHashSet(
|
||||
@VisibleForTesting
|
||||
static final Set<String> HOT_SWAPPABLE = SetUtil.newHashSet(
|
||||
VERIFY_V2,
|
||||
CLIENT_EXPIRATION,
|
||||
GROUP_CALLING,
|
||||
GV1_MIGRATION_JOB,
|
||||
DISABLE_CUSTOM_VIDEO_MUXER
|
||||
CUSTOM_VIDEO_MUXER
|
||||
);
|
||||
|
||||
/**
|
||||
* Flags in this set will stay true forever once they receive a true value from a remote config.
|
||||
*/
|
||||
private static final Set<String> STICKY = SetUtil.newHashSet(
|
||||
@VisibleForTesting
|
||||
static final Set<String> STICKY = SetUtil.newHashSet(
|
||||
VERIFY_V2
|
||||
);
|
||||
);
|
||||
|
||||
/**
|
||||
* Listeners that are called when the value in {@link #REMOTE_VALUES} changes. That means that
|
||||
@@ -257,7 +267,7 @@ public final class FeatureFlags {
|
||||
|
||||
/** Whether to use the custom streaming muxer or built in android muxer. */
|
||||
public static boolean useStreamingVideoMuxer() {
|
||||
return !getBoolean(DISABLE_CUSTOM_VIDEO_MUXER, false);
|
||||
return getBoolean(CUSTOM_VIDEO_MUXER, false);
|
||||
}
|
||||
|
||||
/** Only for rendering debug info. */
|
||||
|
||||
Reference in New Issue
Block a user