use of com.battlelancer.seriesguide.dataliberation.JsonExportTask in project SeriesGuide by UweTrottmann.
the class TaskManager method tryBackupTask.
/**
* If no {@link AddShowTask} or {@link JsonExportTask} created by this {@link
* com.battlelancer.seriesguide.util.TaskManager} is running a
* {@link JsonExportTask} is scheduled in silent mode.
*/
@MainThread
public synchronized boolean tryBackupTask(Context context) {
if (!isAddTaskRunning() && (backupTask == null || backupTask.isCompleted())) {
JsonExportTask exportTask = new JsonExportTask(context, null, false, true, null);
backupTask = exportTask.launch();
return true;
}
return false;
}
use of com.battlelancer.seriesguide.dataliberation.JsonExportTask in project SeriesGuide by UweTrottmann.
the class TaskManager method tryBackupTask.
/**
* If no {@link AddShowTask} or {@link JsonExportTask} created by this {@link
* com.battlelancer.seriesguide.util.TaskManager} is running a
* {@link JsonExportTask} is scheduled in silent mode.
*/
public synchronized void tryBackupTask() {
if (!isAddTaskRunning() && (mBackupTask == null || mBackupTask.getStatus() == AsyncTask.Status.FINISHED)) {
mBackupTask = new JsonExportTask(mContext, null, null, false, true);
AsyncTaskCompat.executeParallel(mBackupTask);
}
}
Aggregations