Don't automatically decline tracking jobs with met initial delays
Just an already-satisfied initial delay doesn't let us decline to track the (new) job: it might not actually be runnable yet, and if it has a deadline as well, we definitely need to track it. If it has no deadline, though, then a met initial delay means that the TimeController can indeed safely just mark the delay constraint as met and stop tracking it. Change-Id: I20919fa384c1fcb1c619efb8f05b8ba856ed44b3 Fixes: 77233219 Test: atest CtsJobSchedulerTestCases:TimingConstraintsTest
This commit is contained in:
@@ -90,7 +90,10 @@ public final class TimeController extends StateController {
|
||||
return;
|
||||
} else if (job.hasTimingDelayConstraint() && evaluateTimingDelayConstraint(job,
|
||||
nowElapsedMillis)) {
|
||||
return;
|
||||
if (!job.hasDeadlineConstraint()) {
|
||||
// If it doesn't have a deadline, we'll never have to touch it again.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
boolean isInsert = false;
|
||||
|
||||
Reference in New Issue
Block a user