e9a988caca733d2f292991a52a0047685a69812f |
|
28-May-2016 |
Dianne Hackborn <hackbod@google.com> |
Work on issue #28942589: Tune job scheduler We now have a new settings key that provides all of the existing tuning parameters, plus some newly redone ones for dealing with different memory levels. Changed the minimum batching for overall jobs from 2 to 1, so we will never get in the way of immediately scheduling jobs when the developer asks for this. We should now be able to rely on the doze modes to do better batching of jobs for us when it is really important. Also work on issue #28981330: Excessive JobScheduler wakeup alarms. Use a work source with scheduled alarms to blame them on the app whose job they are being scheduled for, and add a check for whether a job's timing constraint has been satisfied before considering it a possible candidate for the next alarm. (If it is satisified, the time is in the past, so we should not schedule an alarm for it.) Finally clean up a bunch of the dumpsys output to make it easier to understand. Change-Id: I06cf2c1310448f47cf386f393e9b267335fabaeb
/frameworks/base/services/core/java/com/android/server/job/controllers/BatteryController.java
|
ef3aa6ee53c5e4f1c50dd5a9b5821c54e449d4b3 |
|
30-Apr-2016 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #28477006: Add small event log to job scheduler Added. Also fixed dumpsys output when filtering, to apply the filter to (almost) all of the output. Change-Id: Iafb446599ad8fddbe8a766784deff618a6cfdbb7
/frameworks/base/services/core/java/com/android/server/job/controllers/BatteryController.java
|
141f11c82a2dbf042833f75aeae6f028e8ae2084 |
|
06-Apr-2016 |
Dianne Hackborn <hackbod@google.com> |
More work on issue #26390151: Add new JobScheduler API... ...for monitoring content providers - Improve media provider change reporting so that observers can avoid spurious reports of the top-level content directory changing. - Fix a bug where collected content changes while a job was running were not being properly propagated to the next job. Change-Id: I29e3c2960e6fec75b16ee3ee6588d47342bf8c75
/frameworks/base/services/core/java/com/android/server/job/controllers/BatteryController.java
|
b0001f6fb1383d9824c2733896b0b348e7f77240 |
|
16-Feb-2016 |
Dianne Hackborn <hackbod@google.com> |
Remove internal locking from JobStatus. Now all state of JobStatus is implicitly protected by the lock of whoever is using it -- in this case the global lock for the JobSchedulerService. This allows us to remove all of the atomic variables and just replace those with a simple bit field. The required constraints for a job are now statically defined once a JobStatus is created, and don't change. (They wouldn't change before, but now this is absolutely specified to be the case.) This required tweaking the constructors a bit so that the earliest and latest run times are computed as part of the core class initialization. Also clarified methods on StateController that are called with the lock held, and took advantage of that in the various controllers to not now redundantly re-acquire the lock. Change-Id: I595c5e7d1bff1bd2ff906d612581af82878a25ee
/frameworks/base/services/core/java/com/android/server/job/controllers/BatteryController.java
|
33d31c5b70c7d056e799e34bb6eccbe6939714ea |
|
16-Feb-2016 |
Dianne Hackborn <hackbod@google.com> |
Simplify job scheduler service locking. Unify all locks to just one lock protecting the entire service. There is really no need for more complicated locking -- there is nothing in the code that can take a long time to complete. And having a single lock will allow various parts of the code to be much simpler and easier to maintain. This is just the first step of the change, switching all of the locking to use one lock. With this done, we can now start simplifying the code. For example, JobStatus no longer needs to do any locking (or have atomic variables and such), it can just rely on its callers holding the global service lock. Change-Id: I502916ed7f2994b601750c67a59a96b1a4e95c6d
/frameworks/base/services/core/java/com/android/server/job/controllers/BatteryController.java
|
1a30bd9b13fd127d9bbfdc5fd4cb2f80ab7ece21 |
|
11-Jan-2016 |
Dianne Hackborn <hackbod@google.com> |
Add and implement JobScheduler content observer APIs. Allows one to schedule jobs to run when content URIs change, and find out what changed when the job executes. This required adding a new API to StateController to tell it when we are about to start executing a job, so we can transfer the currently collected changes out of its internal state to fill it in to the JobParameters. Also some additional dumpsys debug output to help understand what is going on in the job scheduler. Change-Id: I91f51b226ff4add7a271a8333beffa5e86c7bf18
/frameworks/base/services/core/java/com/android/server/job/controllers/BatteryController.java
|
4870e9d5eba59fb257a87f97f1adf0b734cf48d3 |
|
09-Apr-2015 |
Dianne Hackborn <hackbod@google.com> |
More work on device idle mode and other power stuff. Add idle mode support to the alarm manager. Introduce a new concept of flags associated with alarms to tell the alarm manager how to treat the alarm -- they allow everything from the alarm that will bring us out of idle mode, to alarms that are allowed when idle or should also bring us out of idle. The standalone boolean is now also a flag. (Note there is currently no protection from user space setting the flags however it wants; I will be working on that in a follow-up change.) When in idle mode, the alarm manager pushes all alarms that shouldn't execute during that time over to a separate list that is not executed until out of idle. To help with this, I reworked a bit how Alarm objects are managed, so that when rebatching or moving between lists we don't have to allocated new objects but can just use the same existing instance. Also tweaked the sync manager to deal with idle mode, which currently just means doing the same thing as when low on storage -- turning off sync. Add new ACTION_CHARGING and ACTION_DISCHARGING broadcasts that apps can listen for to know when the device is actively charging and discharging. These are better than the old POWER_CONNECTED and POWER_DISCONNECTED ones because we only report charging when we actually see that there is enough power being provided to charge the battery (and will report discharging if there is not enough power). The job controller uses these new actions for scheduling jobs that want to run while plugged in. Removed the "stable charging" stuff while doing so, since the new charging state serves as an even better signal for that. Introduced two new process states: FOREGROUND_SERVICE and TOP_SLEEPING. This will allow us to treat foreground services specially (such as still allowing network access to them for background music playback) while not mixing them together with whatever happens to be the top activity while the device is asleep. Also some other small cleanup here and there. Change-Id: I7a9808b578bad6f50deb8e1baf919298512a0d3a
/frameworks/base/services/core/java/com/android/server/job/controllers/BatteryController.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/services/core/java/com/android/server/job/controllers/BatteryController.java
|
2139276ce8b54aba5faa858ca69ed5f01445c269 |
|
14-Jun-2014 |
Jeff Brown <jeffbrown@google.com> |
Refactor BatteryService to new pattern. Apply SystemService pattern to BatteryService. Change-Id: I4971b2da8d2aed4d14440fb65863a8b916bab03c
/frameworks/base/services/core/java/com/android/server/job/controllers/BatteryController.java
|
759275d9da1e78cf9bffbd28bb1d585fa3257aaa |
|
10-Jun-2014 |
Matthew Williams <mjwilliams@google.com> |
Fix battery controller non-fire bug Receiver wasn't registered to listen for the action coming back from the Alarm Manager. Also, if a task starts being tracked by the battery controller and the device is on power, the batt. controller will notify the scheduler as such. Added dumpsys for battery controller to help debugging. Change-Id: I7ce305b816aea69e8d05a3daf23124c163546788
/frameworks/base/services/core/java/com/android/server/job/controllers/BatteryController.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/services/core/java/com/android/server/job/controllers/BatteryController.java
|