mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Fix backup scheduling looping bug.
This commit is contained in:
committed by
Alex Hart
parent
89b0167fd2
commit
6c78a405bb
@@ -49,11 +49,11 @@ public class LocalBackupListener extends PersistentAlarmManagerListener {
|
||||
if (Build.VERSION.SDK_INT < 31) {
|
||||
nextTime = System.currentTimeMillis() + INTERVAL;
|
||||
} else {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
int hour = SignalStore.settings().getBackupHour();
|
||||
int minute = SignalStore.settings().getBackupMinute();
|
||||
LocalDateTime next = now.withHour(hour).withMinute(minute).withSecond(0);
|
||||
if (now.getHour() >= 2) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
int hour = SignalStore.settings().getBackupHour();
|
||||
int minute = SignalStore.settings().getBackupMinute();
|
||||
LocalDateTime next = now.withHour(hour).withMinute(minute).withSecond(0);
|
||||
if (now.isAfter(next)) {
|
||||
next = next.plusDays(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user