d86b8fea43ebb6e5c31691b44d8ceb0d8d3c9072 |
|
03-Jun-2017 |
Jeff Sharkey <jsharkey@android.com> |
Annotate @SystemApi with required permissions. Most @SystemApi methods should be protected with system (or higher) permissions, so annotate common methods with @RequiresPermission to make automatic verification easier. Verification is really only relevant when calling into system services (where permissions checking can happen on the other side of a Binder call), so annotate managers with the new @SystemService annotation, which is now automatically documented. This is purely a docs change; no logic changes are being made. Test: make -j32 update-api && make -j32 offline-sdk-docs Bug: 62263906 Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
30e06bb668f2e4b024c4ebc2a131de91c96de5eb |
|
24-Apr-2017 |
Jeff Sharkey <jsharkey@android.com> |
Even more auto-doc work. Update docs based on what new lint detector found. Add new @IntDef to parameters or methods returning constants or flags, and add @RequiresPermission to methods mentioning permissions. Test: make -j32 offline-sdk-docs Bug: 37526420 Change-Id: I7f640f7883fcb66b911a52ae93b83f77306571ec
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
28d1b661347a6a7e05dc1004fd7e8436cace8953 |
|
21-Apr-2017 |
Dianne Hackborn <hackbod@google.com> |
Address various JobScheduler API feedback. - New sample code. - Fix/improve some docs. - Hide JobWorkItem Parcl constructor. Also: - Add new JobWorkItem API to get the number of times it has been delivered. - Do a bit more optimization of checking if a job is ready. Bug: 37534393 API Review: JobInfo.Builder Bug: 37544057 API Review: JobServiceEngine Bug: 37544153 API Review: JobWorkItem Test: bit CtsJobSchedulerTestCases:* Change-Id: I66891a038fba752f45dcaed43e615fa9209b71fc
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
f9bac16d61db0fceb15484587ecf876c2b802c37 |
|
21-Apr-2017 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #32180780: Sync adapters inappropriately being run... ...during full-data backup/restore The activity manager now tells job scheduler service about the current backup that is running (only if it is a full backup), it there is a new condition where we won't consider jobs associated with the current backup to be ready to run. Also... just a little optimization here. :) The focus is on scheduling jobs with a 0 deadline, meaning they should run right away. Now the timing controller does a quick check for a new job to see if its constraints are already satisifed, and doesn't do anything further if that is the case (doesn't add to the list, doesn't re-evaluate alarms, etc). And in the path to scheduling a job, we do a check to see if the new job is already ready and if so then just directly add it to the pending list and schedule it. Doing this required removing what I think is the last bit of code relying on handler serializing for thread safety, so now everything in the job scheduler is protected by our global lock and we can do whatever we want with the lock held and be assured the state remains consistent. Also did some small optimizations to many of the other controllers, mostly switching from an ArrayList to an ArraySet for their tracked jobs, since one of the things we do frequently is add/remove jobs. Finally, added some nullability annotations to the JobScheduler APIs. Test: bit CtsJobSchedulerTestCases:* Change-Id: I533fad94ba59468a52fe3d077a0ceab3427f0012
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
7da13d7c3e5b48c0410ae869c5679652de97e5aa |
|
05-Apr-2017 |
Dianne Hackborn <hackbod@google.com> |
Add new "work queue" feature to JobScheduler. This gives semantics similar to the start command queue of services. The implementation is currently lacking in URI permission grant handling of the work intents; that will be coming in a follow-up change. This includes a first step of adjusting/fixing locking within JobSchedulerService. The JobServiceContext class has a bunch of stuff it does that assumes it doesn't need locking because it schedules the work on a handler. However, to be able to correctly implement the work finish flow (that takes care of stopping the job when there is no more work), we can't dispatch these asynchronously so need to get rid of that and just do explicit locking. The switch to explicit locking is half-way there (again the remaining part will be a follow-on CL). Right now we have the locking, but still also the handler. But it turns out there were a number of things we were doing without a lock held where we actually should have been holding a lock, so this is better anyway. Test: new tests added Change-Id: Iebd098046209b28e60fd2f4d855d7f91cd3a8b03
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
1150b735c8d58ed86c897fa9b6dc5872ce286d6d |
|
29-Jun-2016 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #29871385: Need JobScheduler.scheduleAsPackage to be system API Change-Id: I0034b1681158b9a010d01fb0fcbe7990d9038c1f
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
f07c7b9fd0a640bff4bf7690373613da217fe69b |
|
22-Apr-2016 |
Jeff Sharkey <jsharkey@android.com> |
API changes for DownloadManager and JobScheduler. To support moving DownloadManager, add new JobScheduler network type constraint that matches "any network except roaming." Also add an API to get a specific JobInfo by ID. Since the default network can be different on a per-app basis, and individual apps may be blocked due to app standby, evaluate job connectivity constraints on a per-UID basis. To implement this cleanly, add NetworkInfo.isMetered() to match the isRoaming() API. Add new DownloadManager APIs to support charging and device idle constraints, which are plumbed through to JobScheduler under the hood when scheduled. Add filtering to JobScheduler dumpsys to omit noisy details for packages the caller isn't interested in. Bug: 28098882, 26571724, 19821935 Change-Id: I09ca7184ef7ce6adba399f579d415a5fb2ea6110
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
1085ff6ee531931ef7f55cbadbc83616f619b292 |
|
24-Feb-2016 |
Dianne Hackborn <hackbod@google.com> |
Work towards issue #26390161: Throttle syncs/jobs when system is low on RAM First, we need to make the job scheduler prioritize jobs for foreground apps over background apps (so we will degrade well when we are limiting the number of concurrent jobs). So now the job scheduler keeps track of the process state of each uid, and uses that to bump up the priority of jobs associated with foreground uids. Added constants for priorities since we have different places specifying priorities. Also cleaned up a bit of the reporting of "wrapped" jobs from the sync manager -- there is a new tag argument that can be supplied, to have the name and tag used in various places be based on that instead of the useless internal class name. Change-Id: I8781750ddfac1472a98e1873fc38c014425db3d6
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
968ac75c2048214a28e9eac3d0e2e0d23776f887 |
|
12-Jan-2016 |
Shreyas Basarge <snb@google.com> |
Adds sourcePackageName field to JobStatus Platform apps can schedule a job on behalf of some other package. Battery stats and appIdleState will be computed using sourcePackageName. Change-Id: If52f6e1db3a563ef0854d1f59fbc6088a0c29ad1
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
e28f9033a0b691c935327cedc416eaff5de7e4f2 |
|
17-Dec-2015 |
Shreyas Basarge <snb@google.com> |
Fixes Javadoc of JobScheduler Javadoc of RESULT_SUCCESS seemed to indicate it was a failure. Return value of schedule(JobInfo) is not a job id, fixed in this CL. Bug: 26114485 Change-Id: Ic5130a04777485cdebc860307160106662bf80a3
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac |
|
28-Feb-2015 |
John Spurlock <jspurlock@google.com> |
Remove unused imports in frameworks/base. Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
93b47603bfa11d95ab3d87e5dbc55f128244ff81 |
|
03-Sep-2014 |
Eino-Ville Talvala <etalvala@google.com> |
JobScheduler: Fix doc build break Change-Id: I769da7274fe5e3f64a47c82f893afeee6a11254e
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
75fc5258b73b4b9b079a9383420a1d6b88575d72 |
|
03-Sep-2014 |
Matthew Williams <mjwilliams@google.com> |
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
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
bafeeb98135a7580cbcdd657818cd78f7bda35d8 |
|
08-Aug-2014 |
Matthew Williams <mjwilliams@google.com> |
JobScheduler needs to flush queue on charging Also make it illegal to schedule a job with no constraints. BUG: 16877705 Change-Id: Iae57286bc4f73163a7e3c9d2d531623fd50f1f72
/frameworks/base/core/java/android/app/job/JobScheduler.java
|
7060b04f6d92351b67222e636ab378a0273bf3e7 |
|
10-Jun-2014 |
Christopher Tate <ctate@google.com> |
Out with the old; in with the new Switch to the official "JobScheduler" etc naming. Bug 14997851 Change-Id: I73a61aaa9af0740c114d08188bd97c52f3ac86b7
/frameworks/base/core/java/android/app/job/JobScheduler.java
|