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:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user