mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Remove KBS feature flag.
This commit is contained in:
committed by
Greyson Parrelli
parent
4f921d761d
commit
ed0c4b8de5
@@ -50,7 +50,6 @@ public final class FeatureFlags {
|
||||
private static final String PROFILE_DISPLAY = generateKey("profileDisplay");
|
||||
private static final String MESSAGE_REQUESTS = generateKey("messageRequests");
|
||||
private static final String USERNAMES = generateKey("usernames");
|
||||
private static final String KBS = generateKey("kbs");
|
||||
private static final String STORAGE_SERVICE = generateKey("storageService");
|
||||
private static final String PINS_FOR_ALL = generateKey("beta.pinsForAll"); // TODO [alex] remove beta prefix
|
||||
private static final String PINS_MEGAPHONE_KILL_SWITCH = generateKey("pinsMegaphoneKillSwitch");
|
||||
@@ -76,7 +75,6 @@ public final class FeatureFlags {
|
||||
* more burden on the reader to ensure that the app experience remains consistent.
|
||||
*/
|
||||
private static final Set<String> HOT_SWAPPABLE = Sets.newHashSet(
|
||||
KBS,
|
||||
PINS_MEGAPHONE_KILL_SWITCH
|
||||
);
|
||||
|
||||
@@ -144,16 +142,9 @@ public final class FeatureFlags {
|
||||
return value;
|
||||
}
|
||||
|
||||
/** Set or migrate PIN to KBS */
|
||||
public static boolean kbs() {
|
||||
return getValue(KBS, false);
|
||||
}
|
||||
|
||||
/** Storage service. Requires {@link #kbs()}. */
|
||||
/** Storage service. */
|
||||
public static boolean storageService() {
|
||||
boolean value = getValue(STORAGE_SERVICE, false);
|
||||
if (value && !kbs()) throw new MissingFlagRequirementError();
|
||||
return value;
|
||||
return getValue(STORAGE_SERVICE, false);
|
||||
}
|
||||
|
||||
/** Enables new KBS UI and notices but does not require user to set a pin */
|
||||
|
||||
@@ -160,7 +160,6 @@ public class TextSecurePreferences {
|
||||
@Deprecated
|
||||
private static final String REGISTRATION_LOCK_PIN_PREF_V1 = "pref_registration_lock_pin";
|
||||
|
||||
private static final String REGISTRATION_LOCK_LAST_REMINDER_TIME = "pref_registration_lock_last_reminder_time";
|
||||
private static final String REGISTRATION_LOCK_LAST_REMINDER_TIME_POST_KBS = "pref_registration_lock_last_reminder_time_post_kbs";
|
||||
private static final String REGISTRATION_LOCK_NEXT_REMINDER_INTERVAL = "pref_registration_lock_next_reminder_interval";
|
||||
|
||||
@@ -272,16 +271,11 @@ public class TextSecurePreferences {
|
||||
}
|
||||
|
||||
public static long getRegistrationLockLastReminderTime(@NonNull Context context) {
|
||||
return getLongPreference(context, getAppropriateReminderKey(), 0);
|
||||
return getLongPreference(context, REGISTRATION_LOCK_LAST_REMINDER_TIME_POST_KBS, 0);
|
||||
}
|
||||
|
||||
public static void setRegistrationLockLastReminderTime(@NonNull Context context, long time) {
|
||||
setLongPreference(context, getAppropriateReminderKey(), time);
|
||||
}
|
||||
|
||||
private static String getAppropriateReminderKey() {
|
||||
return FeatureFlags.kbs() ? REGISTRATION_LOCK_LAST_REMINDER_TIME_POST_KBS
|
||||
: REGISTRATION_LOCK_LAST_REMINDER_TIME;
|
||||
setLongPreference(context, REGISTRATION_LOCK_LAST_REMINDER_TIME_POST_KBS, time);
|
||||
}
|
||||
|
||||
public static long getRegistrationLockNextReminderInterval(@NonNull Context context) {
|
||||
|
||||
Reference in New Issue
Block a user