Fix can create backups when timed backup is waiting for charging constraint.

This commit is contained in:
Alan Evans
2020-09-29 11:00:46 -03:00
parent 19c74c8872
commit 8de4290c5b
5 changed files with 22 additions and 22 deletions

View File

@@ -6,7 +6,6 @@ import android.content.Intent;
import androidx.annotation.NonNull;
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
import org.thoughtcrime.securesms.jobs.LocalBackupJob;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
@@ -24,7 +23,7 @@ public class LocalBackupListener extends PersistentAlarmManagerListener {
@Override
protected long onAlarm(Context context, long scheduledTime) {
if (TextSecurePreferences.isBackupEnabled(context)) {
ApplicationDependencies.getJobManager().add(new LocalBackupJob(false));
LocalBackupJob.enqueue(false);
}
return setNextBackupTimeToIntervalFromNow(context);