History log of /frameworks/base/services/core/java/com/android/server/job/controllers/StateController.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/StateController.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/StateController.java
cb926fcec46b111d69059874d63c4cbebb5903c4 15-Mar-2016 Amith Yamasani <yamasani@google.com> Move device idle logic into a job StateController

Move most of device idle (doze) logic from JobSchedulerService
to DeviceIdleJobsController.

Allow whitelisted apps to run during device idle by adding
a new constraint DEVICE_NOT_DOZING. Using the word DOZE to
disambiguate from IDLE because the latter is used to mean
that the job wants to run in idle-maintenance period.

Bug: 26851107

Change-Id: I97f5286bd4d5ca18fbc46c2037c310fd369e18bf
/frameworks/base/services/core/java/com/android/server/job/controllers/StateController.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/StateController.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/StateController.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/StateController.java
fa8e5084eed63ab8d92c71fcff656690a30293c3 16-Oct-2015 Matthew Williams <mjwilliams@google.com> Sanity check loaded periodics and cap runtime.

BUG: 24900376
We've seen an issue where periodic run times can be massively
inflated after loading from disk.
As a safeguard, cap the period's loaded runtime to be [p, 2p]
from the time of loading.

Change-Id: Ie4464490c8d6702fee8efe9190c3da5dc5f013f6
/frameworks/base/services/core/java/com/android/server/job/controllers/StateController.java
b0ff32245cb6b51e43dd3ee40b86d683c62de2b9 04-Mar-2015 Amith Yamasani <yamasani@google.com> Throttle jobs for idle apps

First pass at delaying jobs from apps that are idle.

TODO: Throttle syncs
TODO: Provide a periodic point at which apps are checked for idleness.

Apps that switch to foreground process state are tracked by UsageStats
as an INTERACTION event that affects the last-used timestamp.

JobScheduler's logic for when an app is ready is trumped by the idleness
of the app, and only if the battery is not charging. When charging state
changes, we update the idle state of all the tracked jobs.

android package is whitelisted.

Bug: 20066058
Change-Id: I0a0acb517b100a5c7b11e3f435f4141375f3451f
/frameworks/base/services/core/java/com/android/server/job/controllers/StateController.java
88e98dfa59e68a860d8c3b462ec03bc0b06d6b5c 23-Mar-2015 Dianne Hackborn <hackbod@google.com> More work on device idle mode.

- There is now an API for people to find out about
its state.
- Moved DeviceIdleController to be closer to the
power manager implementation, since they are
closely related.
- Job scheduler now knows about idle state and doesn't
run jobs while the device is idle.
- Battery stats now keeps track of "idling" vs "idle mode".
Idling is when we consider the device to be idle,
independent of whether we are actually in deep idle mode.
This allows us to keep track of longer-term changes
independently of cycling in and out of idle mode.
- Battery stats also now keeps track of package changes in
its daily stats.
- Small optimization to network policy manager service to
not touch uids that do not have the NETWORK permission.

Change-Id: I0b3304fb3722c78cdfdd0c1eada7369ece7cbcf9
/frameworks/base/services/core/java/com/android/server/job/controllers/StateController.java
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac 28-Feb-2015 John Spurlock <jspurlock@google.com> Remove unused imports in frameworks/base.

Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/services/core/java/com/android/server/job/controllers/StateController.java
326f230ceba67a9b72d2606f7c503bef6f938ddd 08-Oct-2014 Georgi Nikolov <geonik@google.com> BUG 17887323: Need to turn off DEBUG log spam in Job Scheduler

Change-Id: Ida7af915c5b616216692493434b63c521398dfb0
/frameworks/base/services/core/java/com/android/server/job/controllers/StateController.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/StateController.java