use of android.app.job.JobService in project android-priority-jobqueue by yigit.
the class FrameworkScheduler method onFinished.
@Override
public void onFinished(SchedulerConstraint constraint, boolean reschedule) {
JqLog.d("[FW Scheduler] on finished job %s. reschedule:%s", constraint, reschedule);
JobService service = this.jobService;
if (service == null) {
JqLog.e("[FW Scheduler] scheduler onFinished is called but i don't have a job service");
return;
}
Object data = constraint.getData();
if (data instanceof JobParameters) {
JobParameters params = (JobParameters) data;
service.jobFinished(params, reschedule);
} else {
JqLog.e("[FW Scheduler] cannot obtain the job parameters");
}
}
Aggregations