From 46499a50bf7e26c4009420aa0510432fcdc8e56e Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Wed, 9 Mar 2016 17:57:48 -0800 Subject: [PATCH] Fix issue #27530395: API Review: JobInfo.Builder Change-Id: I06ff55367ccf0cd3e522b7a3583c51a7345df4aa --- core/java/android/app/job/JobInfo.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/app/job/JobInfo.java b/core/java/android/app/job/JobInfo.java index 039c9d7c3c31c..bbfec41a50156 100644 --- a/core/java/android/app/job/JobInfo.java +++ b/core/java/android/app/job/JobInfo.java @@ -536,6 +536,9 @@ public class JobInfo implements Parcelable { * {@link #setPeriodic(long)} or {@link #setPersisted(boolean)}. To continually monitor * for content changes, you need to schedule a new JobInfo observing the same URIs * before you finish execution of the JobService handling the most recent changes.

+ *

Because because setting this property is not compatible with periodic or + * persisted jobs, doing so will throw an {@link java.lang.IllegalArgumentException} when + * {@link android.app.job.JobInfo.Builder#build()} is called.

* @param uri The content: URI to monitor. */ public Builder addTriggerContentUri(@NonNull TriggerContentUri uri) {