Inline GV1 auto-migration flag.

This commit is contained in:
Greyson Parrelli
2020-12-17 17:46:52 -05:00
parent 372744178e
commit f3ce582fa5
5 changed files with 12 additions and 24 deletions

View File

@@ -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. */