mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Remove Phase 1 in preparation for CFv2.
This commit is contained in:
@@ -232,24 +232,12 @@ public final class MiscellaneousValues extends SignalStoreValues {
|
||||
putBoolean(PNI_INITIALIZED_DEVICES, value);
|
||||
}
|
||||
|
||||
public void startSmsPhase1() {
|
||||
if (!getStore().containsKey(SMS_PHASE_1_START_MS)) {
|
||||
putLong(SMS_PHASE_1_START_MS, System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
public @NonNull SmsExportPhase getSmsExportPhase() {
|
||||
long now = System.currentTimeMillis();
|
||||
long phase1StartMs = getLong(SMS_PHASE_1_START_MS, now);
|
||||
return SmsExportPhase.getCurrentPhase(now - phase1StartMs);
|
||||
}
|
||||
|
||||
public long getSmsPhase3Start() {
|
||||
long now = System.currentTimeMillis();
|
||||
long phase1StartMs = getLong(SMS_PHASE_1_START_MS, now);
|
||||
return phase1StartMs + SmsExportPhase.PHASE_3.getDuration();
|
||||
}
|
||||
|
||||
public void setHasLinkedDevices(boolean value) {
|
||||
putBoolean(HAS_LINKED_DEVICES, value);
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ import org.thoughtcrime.securesms.util.Util
|
||||
import kotlin.time.Duration.Companion.days
|
||||
|
||||
enum class SmsExportPhase(val duration: Long) {
|
||||
PHASE_1(0.days.inWholeMilliseconds),
|
||||
PHASE_2(21.days.inWholeMilliseconds),
|
||||
PHASE_2(0.days.inWholeMilliseconds),
|
||||
PHASE_3(51.days.inWholeMilliseconds);
|
||||
|
||||
fun allowSmsFeatures(): Boolean {
|
||||
@@ -17,10 +16,6 @@ enum class SmsExportPhase(val duration: Long) {
|
||||
return this != PHASE_3
|
||||
}
|
||||
|
||||
fun isFullscreen(): Boolean {
|
||||
return this.ordinal > PHASE_1.ordinal
|
||||
}
|
||||
|
||||
fun isBlockingUi(): Boolean {
|
||||
return this == PHASE_3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user