mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:09:32 +01:00
Adjust SMS phases and show Phase 3 start date.
This commit is contained in:
committed by
Alex Hart
parent
9b08ebcc1d
commit
1f31f4a50a
@@ -236,4 +236,10 @@ public final class MiscellaneousValues extends SignalStoreValues {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import kotlin.time.Duration.Companion.days
|
||||
|
||||
enum class SmsExportPhase(val duration: Long) {
|
||||
PHASE_1(0.days.inWholeMilliseconds),
|
||||
PHASE_2(45.days.inWholeMilliseconds),
|
||||
PHASE_3(105.days.inWholeMilliseconds);
|
||||
PHASE_2(21.days.inWholeMilliseconds),
|
||||
PHASE_3(51.days.inWholeMilliseconds);
|
||||
|
||||
fun allowSmsFeatures(): Boolean {
|
||||
return Util.isDefaultSmsProvider(ApplicationDependencies.getApplication()) && SignalStore.misc().smsExportPhase.isSmsSupported()
|
||||
|
||||
Reference in New Issue
Block a user