If the job has no constraints other than a deadline
JobParameters#isOverrideDeadlineExpired will never
return true. The bug is that the better name for
this implementation is really
"jobParameters#areConstraintsSatisfied". Which are
ostensibly one and the same *except* for the case
where there are no constraints other than time.
Change-Id: I2e055b1279480283b13269b51cb489c64debfffd
}
mRunningJob = job;
- mParams = new JobParameters(this, job.getJobId(), job.getExtras(),
- !job.isConstraintsSatisfied());
+ final boolean isDeadlineExpired =
+ job.getLatestRunTimeElapsed() >= SystemClock.elapsedRealtime();
+ mParams = new JobParameters(this, job.getJobId(), job.getExtras(), isDeadlineExpired);
mExecutionStartTimeElapsed = SystemClock.elapsedRealtime();
mVerb = VERB_BINDING;