Add feature flag for donor badges megaphone.

This commit is contained in:
Alex Hart 2021-11-04 14:09:46 -03:00 committed by Greyson Parrelli
parent 00a8565e91
commit 33dbf316a9
2 changed files with 8 additions and 2 deletions

View file

@ -384,7 +384,7 @@ public final class Megaphones {
} }
private static boolean shouldShowBecomeASustainerMegaphone() { private static boolean shouldShowBecomeASustainerMegaphone() {
return FeatureFlags.donorBadges(); return FeatureFlags.donorBadgesMegaphone();
} }
private static boolean shouldShowNotificationsMegaphone(@NonNull Context context) { private static boolean shouldShowNotificationsMegaphone(@NonNull Context context) {

View file

@ -85,6 +85,7 @@ public final class FeatureFlags {
private static final String GROUP_CALL_RINGING = "android.calling.groupCallRinging"; private static final String GROUP_CALL_RINGING = "android.calling.groupCallRinging";
private static final String CHANGE_NUMBER_ENABLED = "android.changeNumber"; private static final String CHANGE_NUMBER_ENABLED = "android.changeNumber";
private static final String DONOR_BADGES = "android.donorBadges.2"; private static final String DONOR_BADGES = "android.donorBadges.2";
private static final String DONOR_BADGES_MEGAPHONE = "android.donorBadges.megaphone";
private static final String CDSH = "android.cdsh"; private static final String CDSH = "android.cdsh";
/** /**
@ -124,7 +125,8 @@ public final class FeatureFlags {
GROUP_CALL_RINGING, GROUP_CALL_RINGING,
CDSH, CDSH,
SENDER_KEY_MAX_AGE, SENDER_KEY_MAX_AGE,
DONOR_BADGES DONOR_BADGES,
DONOR_BADGES_MEGAPHONE
); );
@VisibleForTesting @VisibleForTesting
@ -414,6 +416,10 @@ public final class FeatureFlags {
} }
} }
public static boolean donorBadgesMegaphone() {
return getBoolean(DONOR_BADGES_MEGAPHONE, false);
}
public static boolean cdsh() { public static boolean cdsh() {
return Environment.IS_STAGING && getBoolean(CDSH, false); return Environment.IS_STAGING && getBoolean(CDSH, false);
} }