summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorMatthew Williams <mjwilliams@google.com>2014-08-21 13:47:47 -0700
committerMatthew Williams <mjwilliams@google.com>2014-08-21 20:28:12 -0700
commit9ae3dbeefcd6bc139c74bfe3d51de823e3be4b4b (patch)
tree9091f11de601187a418a60d579035a2edeb3a33d /core/java
parentbfecd904bf0ea8875caaaaafa5e3ae8c44b5175f (diff)
downloadframeworks_base-9ae3dbeefcd6bc139c74bfe3d51de823e3be4b4b.zip
frameworks_base-9ae3dbeefcd6bc139c74bfe3d51de823e3be4b4b.tar.gz
frameworks_base-9ae3dbeefcd6bc139c74bfe3d51de823e3be4b4b.tar.bz2
JobScheduler only run jobs for started users.
BUG: 12876556 Minor changes to test app to make persisting an option. Change-Id: I1b40347878ec5ca44cd717ebfeb544f6c58473b5
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/job/JobInfo.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/app/job/JobInfo.java b/core/java/android/app/job/JobInfo.java
index b7af544..e4ed470e 100644
--- a/core/java/android/app/job/JobInfo.java
+++ b/core/java/android/app/job/JobInfo.java
@@ -26,6 +26,9 @@ import android.os.PersistableBundle;
* Container of data passed to the {@link android.app.job.JobScheduler} fully encapsulating the
* parameters required to schedule work against the calling application. These are constructed
* using the {@link JobInfo.Builder}.
+ * You must specify at least one sort of constraint on the JobInfo object that you are creating.
+ * The goal here is to provide the scheduler with high-level semantics about the work you want to
+ * accomplish. Doing otherwise with throw an exception in your app.
*/
public class JobInfo implements Parcelable {
public interface NetworkType {
@@ -434,7 +437,7 @@ public class JobInfo implements Parcelable {
* @return The job object to hand to the JobScheduler. This object is immutable.
*/
public JobInfo build() {
- // Allow tasks with no constraints. What am I, a database?
+ // Allow jobs with no constraints - What am I, a database?
if (!mHasEarlyConstraint && !mHasLateConstraint && !mRequiresCharging &&
!mRequiresDeviceIdle && mNetworkCapabilities == NetworkType.NONE) {
throw new IllegalArgumentException("You're trying to build a job with no " +