Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 673ef9e0 authored by Matthew Williams's avatar Matthew Williams
Browse files

JobParameters#isDeadlineExpired returns wrong value

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
parent f100252f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -153,8 +153,9 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
            }

            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;