mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-24 02:39:55 +01:00
Inline GV1 auto-migration flag.
This commit is contained in:
@@ -61,7 +61,6 @@ public final class FeatureFlags {
|
||||
public static final String DONATE_MEGAPHONE = "android.donate";
|
||||
private static final String VIEWED_RECEIPTS = "android.viewed.receipts";
|
||||
private static final String GROUP_CALLING = "android.groupsv2.calling.2";
|
||||
private static final String GV1_AUTO_MIGRATE = "android.groupsV1Migration.auto.4";
|
||||
private static final String GV1_MANUAL_MIGRATE = "android.groupsV1Migration.manual";
|
||||
private static final String GV1_FORCED_MIGRATE = "android.groupsV1Migration.forced";
|
||||
private static final String GV1_MIGRATION_JOB = "android.groupsV1Migration.job";
|
||||
@@ -81,7 +80,6 @@ public final class FeatureFlags {
|
||||
RESEARCH_MEGAPHONE_1,
|
||||
DONATE_MEGAPHONE,
|
||||
VIEWED_RECEIPTS,
|
||||
GV1_AUTO_MIGRATE,
|
||||
GV1_MIGRATION_JOB,
|
||||
GV1_MANUAL_MIGRATE,
|
||||
GV1_FORCED_MIGRATE,
|
||||
@@ -132,7 +130,6 @@ public final class FeatureFlags {
|
||||
* desired test state.
|
||||
*/
|
||||
private static final Map<String, OnFlagChange> FLAG_CHANGE_LISTENERS = new HashMap<String, OnFlagChange>() {{
|
||||
put(GV1_AUTO_MIGRATE, change -> ApplicationDependencies.getJobManager().add(new RefreshAttributesJob()));
|
||||
}};
|
||||
|
||||
private static final Map<String, Object> REMOTE_VALUES = new TreeMap<>();
|
||||
@@ -236,11 +233,6 @@ public final class FeatureFlags {
|
||||
return Build.VERSION.SDK_INT > 19 && getBoolean(GROUP_CALLING, false);
|
||||
}
|
||||
|
||||
/** Whether or not auto-migration from GV1->GV2 is enabled. */
|
||||
public static boolean groupsV1AutoMigration() {
|
||||
return getBoolean(GV1_AUTO_MIGRATE, false);
|
||||
}
|
||||
|
||||
/** Whether or not we should run the job to proactively migrate groups. */
|
||||
public static boolean groupsV1MigrationJob() {
|
||||
return getBoolean(GV1_MIGRATION_JOB, false);
|
||||
@@ -248,12 +240,12 @@ public final class FeatureFlags {
|
||||
|
||||
/** Whether or not manual migration from GV1->GV2 is enabled. */
|
||||
public static boolean groupsV1ManualMigration() {
|
||||
return getBoolean(GV1_MANUAL_MIGRATE, false) && groupsV1AutoMigration();
|
||||
return getBoolean(GV1_MANUAL_MIGRATE, false);
|
||||
}
|
||||
|
||||
/** Whether or not forced migration from GV1->GV2 is enabled. */
|
||||
public static boolean groupsV1ForcedMigration() {
|
||||
return getBoolean(GV1_FORCED_MIGRATE, false) && groupsV1ManualMigration() && groupsV1AutoMigration();
|
||||
return getBoolean(GV1_FORCED_MIGRATE, false) && groupsV1ManualMigration();
|
||||
}
|
||||
|
||||
/** Whether or not to send viewed receipts. */
|
||||
|
||||
Reference in New Issue
Block a user