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

@@ -18,7 +18,6 @@ import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.backup.BackupDialog;
import org.thoughtcrime.securesms.backup.FullBackupBase.BackupEvent;
import org.thoughtcrime.securesms.components.SwitchPreferenceCompat;
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
import org.thoughtcrime.securesms.jobs.LocalBackupJob;
import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.permissions.Permissions;
@@ -152,8 +151,8 @@ public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment {
.request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
.ifNecessary()
.onAllGranted(() -> {
Log.i(TAG, "Queing backup...");
ApplicationDependencies.getJobManager().add(new LocalBackupJob(true));
Log.i(TAG, "Starting backup from user");
LocalBackupJob.enqueue(true);
})
.withPermanentDenialDialog(getString(R.string.ChatsPreferenceFragment_signal_requires_external_storage_permission_in_order_to_create_backups))
.execute();