diff options
author | 2024-02-09 14:56:30 +0000 | |
---|---|---|
committer | 2024-02-09 14:56:30 +0000 | |
commit | 30965fedf97ce8913fc0883f286837dd211376e5 (patch) | |
tree | a0408273dc2cb911241e42bdb21daec9b535c633 | |
parent | 08d765d4a39651ce28e0a4535a4f308f9f7a8585 (diff) |
Update time window message.
Update the short time window exception message to explain why the window
is a problem so developers can make changes more appropriately than just
setting the value to the minimum.
Bug: 311402873
Test: N/A
Change-Id: Ia01f4da1454566457196fff496ad9aa0a763d06f
-rw-r--r-- | apex/jobscheduler/framework/java/android/app/job/JobInfo.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apex/jobscheduler/framework/java/android/app/job/JobInfo.java b/apex/jobscheduler/framework/java/android/app/job/JobInfo.java index 7284f479df35..7de67993bc62 100644 --- a/apex/jobscheduler/framework/java/android/app/job/JobInfo.java +++ b/apex/jobscheduler/framework/java/android/app/job/JobInfo.java @@ -2354,9 +2354,9 @@ public class JobInfo implements Parcelable { if (maxExecutionDelayMillis - windowStart < MIN_ALLOWED_TIME_WINDOW_MILLIS) { if (enforceMinimumTimeWindows && Flags.enforceMinimumTimeWindows()) { - throw new IllegalArgumentException("Jobs with a deadline and" - + " functional constraints cannot have a time window less than " - + MIN_ALLOWED_TIME_WINDOW_MILLIS + " ms." + throw new IllegalArgumentException("Time window too short. Constraints" + + " unlikely to be satisfied. Increase deadline to a reasonable" + + " duration." + " Job '" + service.flattenToShortString() + "#" + jobId + "'" + " has delay=" + windowStart + ", deadline=" + maxExecutionDelayMillis); |