summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/job
diff options
context:
space:
mode:
authorMatthew Williams <mjwilliams@google.com>2014-09-02 16:17:53 -0700
committerMatthew Williams <mjwilliams@google.com>2014-09-03 10:47:27 -0700
commit75fc5258b73b4b9b079a9383420a1d6b88575d72 (patch)
tree981cd38fa60d00c6bf071c0199de43f02201119e /core/java/android/app/job
parent4dc653aaa2c10c0f98d7e42229a2bc7903271fc4 (diff)
downloadframeworks_base-75fc5258b73b4b9b079a9383420a1d6b88575d72.zip
frameworks_base-75fc5258b73b4b9b079a9383420a1d6b88575d72.tar.gz
frameworks_base-75fc5258b73b4b9b079a9383420a1d6b88575d72.tar.bz2
Add timeout when waiting to bind to JobService
BUG: 17322886 bindService() to an invalid service might never actually result in onServiceConnected being called , for e.g. if the client service doesn't actually implement JobService. This wastes an execution slot as we end up waiting forever. Also made the javadocs clearer for the JobScheduler class. Change-Id: Ie15ebbe18c0b7579f2ab77dd46428d354ef632c3
Diffstat (limited to 'core/java/android/app/job')
-rw-r--r--core/java/android/app/job/JobScheduler.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/java/android/app/job/JobScheduler.java b/core/java/android/app/job/JobScheduler.java
index ca7022d..5edc2a0 100644
--- a/core/java/android/app/job/JobScheduler.java
+++ b/core/java/android/app/job/JobScheduler.java
@@ -21,14 +21,23 @@ import java.util.List;
import android.content.Context;
/**
- * Class for scheduling various types of jobs with the scheduling framework on the device.
+ * This is an API for scheduling various types of jobs against the framework that will be executed
+ * in your application's own process.
+ * <p>
* See {@link android.app.job.JobInfo} for more description of the types of jobs that can be run
- * and how to construct them.
+ * and how to construct them. You will construct these JobInfo objects and pass them to the
+ * JobScheduler with {@link #schedule(JobInfo)}. When the criteria declared are met, the
+ * system will execute this job on your application's {@link android.app.job.JobService}.
+ * You identify which JobService is meant to execute the logic for your job when you create the
+ * JobInfo with {@link android.app.job.JobInfo.Builder#Builder(int, android.content.ComponentName)}.
+ * </p>
+ * <p>
* The framework will be intelligent about when you receive your callbacks, and attempt to batch
* and defer them as much as possible. Typically if you don't specify a deadline on your job, it
* can be run at any moment depending on the current state of the JobScheduler's internal queue,
* however it might be deferred as long as until the next time the device is connected to a power
* source.
+ * </p>
* <p>You do not
* instantiate this class directly; instead, retrieve it through
* {@link android.content.Context#getSystemService