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

Commit 19116901 authored by Kweku Adams's avatar Kweku Adams
Browse files

Clarify expired deadline meaning for periodic jobs.

Clarify that a periodic job only runs when its constraints are met
and therefore an expired deadline for a periodic job doesn't mean the
constraints aren't satisfied.

Bug: 19536175
Test: N/A
Change-Id: Id1dc4b5f900b93a6ab8c9724f2952f56205dab11
parent f63877d3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1817,6 +1817,8 @@ public class JobInfo implements Parcelable {
        /**
         * Specify that this job should recur with the provided interval and flex. The job can
         * execute at any time in a window of flex length at the end of the period.
         * If the constraints are not satisfied within the window,
         * the job will wait until the constraints are satisfied.
         * @param intervalMillis Millisecond interval for which this job will repeat. A minimum
         *                       value of {@link #getMinPeriodMillis()} is enforced.
         * @param flexMillis Millisecond flex for this job. Flex is clamped to be at least
+4 −1
Original line number Diff line number Diff line
@@ -438,7 +438,10 @@ public class JobParameters implements Parcelable {
     * For jobs with {@link android.app.job.JobInfo.Builder#setOverrideDeadline(long)} set, this
     * provides an easy way to tell whether the job is being executed due to the deadline
     * expiring. Note: If the job is running because its deadline expired, it implies that its
     * constraints will not be met.
     * constraints will not be met. However,
     * {@link android.app.job.JobInfo.Builder#setPeriodic(boolean) periodic jobs} will only ever
     * run when their constraints are satisfied, therefore, the constraints will still be satisfied
     * for a periodic job even if the deadline has expired.
     */
    public boolean isOverrideDeadlineExpired() {
        return overrideDeadlineExpired;