Allow linear backoff policy for UI jobs.

UI jobs were initially required to have an exponential backoff
as a way to reduce keep-alive abuse. Now that UI jobs have a
cumulative execution limit, there's little reason to disallow a
linear backoff policy.

Bug: 261999509
Test: atest CtsJobSchedulerTestCases:JobInfoTest
Change-Id: I88300b0fb64b1ca34123d3e16eb8e1fa81c586d6
This commit is contained in:
Kweku Adams
2023-03-24 16:38:43 +00:00
parent 0b5e5e38ed
commit b3a5baeec8

View File

@@ -2344,11 +2344,7 @@ public class JobInfo implements Parcelable {
// UIDTs
if (networkRequest == null) {
throw new IllegalArgumentException(
"A user-initaited data transfer job must specify a valid network type");
}
if (backoffPolicy == BACKOFF_POLICY_LINEAR) {
throw new IllegalArgumentException(
"A user-initiated data transfer job cannot have a linear backoff policy.");
"A user-initiated data transfer job must specify a valid network type");
}
}
}