summaryrefslogtreecommitdiff
path: root/core/java/android/app/JobSchedulerImpl.java
Commit message (Collapse)AuthorAgeFilesLines
* Introduce framework-minus-apex and create jobscheduler-framework.jarMakoto Onuki2019-08-121-121/+0
| | | | | | | | | Bug: 137763703 Test: Clean local build + "flash -w" and boot Test: Presubmit Test: atest CtsJobSchedulerTestCases Test: ./cts/tests/signature/runSignatureTests.sh Change-Id: Ie2a5a7a17f903ac18de0bcdde5be25311a62fa01
* Move the job scheduler service code to its own jar file.Makoto Onuki2019-07-291-1/+4
| | | | | | | | | | | - Also remove the dependency from SystemServiceRegistry to JobScheduler See apex/jobscheduler/README_js-mainline.md for the details. Bug: 137763703 Test: build and boot Test: atest CtsJobSchedulerTestCases Change-Id: I2386c78b7a6085d6e543a63f22cb620c4cabd06a
* Revert "Move the job scheduler service code to its own jar file."Makoto Onuki2019-07-251-4/+1
| | | | | | | | This reverts commit 136d1ecf1efa5208bc3007c8459dca91cd0dd290. Reason for revert: My device didn't boot. :( Change-Id: I11636c2ad03a3c14f5953a700fc3a2d629a81a42
* Move the job scheduler service code to its own jar file.Makoto Onuki2019-07-241-1/+4
| | | | | | | | | | | - Also remove the dependency from SystemServiceRegistry to JobScheduler See apex/jobscheduler/README_js-mainline.md for the details. Bug: 137763703 Test: build and boot Test: atest CtsJobSchedulerTestCases Change-Id: Ic8ae8e99e6600b261618b5cfb6590d3f3664ae9f
* Using ParceledListSlice to send large lists over Binder.Kweku Adams2019-05-071-2/+2
| | | | | | | | | | | JobScheduler.getAllPendingJobs() and .getAllJobSnapshots() can potentially contain enough data to exceed the Binder limit. Using a ParceledListSlice will ensure the data can still be sent over Binder. Bug: 70648761 Test: atest CtsJobSchedulerTestCases Test: atest CtsBatterySavingTestCases Change-Id: I79ea32eac56473ca996cc00312b30d0f72ce22c9
* [JobScheduler] Add hidden API call surface for snapshotting job execution stateSerik Beketayev2018-08-071-3/+20
| | | | | | Test: WIP Bug: 111413203 Change-Id: I5356d0821b3d6a657bf50249fdeabf6f0300bf81
* Add new "work queue" feature to JobScheduler.Dianne Hackborn2017-04-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* API changes for DownloadManager and JobScheduler.Jeff Sharkey2016-04-241-0/+9
| | | | | | | | | | | | | | | | | | | | | 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
* Work towards issue #26390161: Throttle syncs/jobs when system is low on RAMDianne Hackborn2016-02-231-2/+2
| | | | | | | | | | | | | | | | | | 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
* Adds sourcePackageName field to JobStatusShreyas Basarge2016-01-151-0/+9
| | | | | | | | Platform apps can schedule a job on behalf of some other package. Battery stats and appIdleState will be computed using sourcePackageName. Change-Id: If52f6e1db3a563ef0854d1f59fbc6088a0c29ad1
* Out with the old; in with the newChristopher Tate2014-06-101-0/+72
Switch to the official "JobScheduler" etc naming. Bug 14997851 Change-Id: I73a61aaa9af0740c114d08188bd97c52f3ac86b7