Fix the way we schedule stuff

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2017-10-15 23:40:38 +02:00 committed by AndyScherzinger
parent 8253595b8a
commit 61cbe88bd0
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 3 additions and 3 deletions

View file

@ -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();

View file

@ -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();