mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
Fix the way we schedule stuff
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
8253595b8a
commit
61cbe88bd0
2 changed files with 3 additions and 3 deletions
|
@ -34,6 +34,7 @@ import android.view.View;
|
|||
import com.evernote.android.job.JobManager;
|
||||
import com.evernote.android.job.JobRequest;
|
||||
import com.evernote.android.job.util.support.PersistableBundleCompat;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
|
@ -113,10 +114,10 @@ public class ContactsPreferenceActivity extends FileActivity implements FileFrag
|
|||
PersistableBundleCompat bundle = new PersistableBundleCompat();
|
||||
bundle.putString(ContactsBackupJob.ACCOUNT, account.name);
|
||||
|
||||
cancelContactBackupJobForAccount(MainApp.getAppContext(), account);
|
||||
|
||||
new JobRequest.Builder(ContactsBackupJob.TAG)
|
||||
.setExtras(bundle)
|
||||
.setRequiresCharging(false)
|
||||
.setUpdateCurrent(true)
|
||||
.setPeriodic(24 * 60 * 60 * 1000)
|
||||
.build()
|
||||
.schedule();
|
||||
|
|
|
@ -316,7 +316,6 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
|
|||
new JobRequest.Builder(ContactsBackupJob.TAG)
|
||||
.setExtras(bundle)
|
||||
.startNow()
|
||||
.setRequiresCharging(false)
|
||||
.setUpdateCurrent(false)
|
||||
.build()
|
||||
.schedule();
|
||||
|
|
Loading…
Reference in a new issue