Initial implementation of light-weight idle mode.
This mode turns on after the screen has been off for 15 minutes, and then cycles through 15 minutes of idle and 1 minute of maintenance, ragardless of whether the device is moving around. It currently only impacts network access and sync/job scheduling. It does not remove access to wake locks or alarms for any apps. It also doesn't report in the public API that the device is in idle mode (since it isn't modifying the behavior of the power manager) -- this is probably what we desire, since we don't want stuff like GCM to be reporting these frequent changes. We'll probably at least want to have the alarm manager do some kind of more aggressive batching of alarms in this most (not allowing more than one wakeup every minute?). That's for the future. Also updated batterystats to include this new information, which means the format of some of the data has changed -- device_idle is no longer a flag, but an enum of (off, light, full), and there is no information about time spent in light modes. Also added new data about the maximum duration spent in both light and full idle modes, to get a better understanding of how those are behaving. And did a little cleanup of DeviceIdleController, removing the sensing alarm which was redundant with the regular alarm. Change-Id: Ibeea6659577dc02deff58f048f97fcd9b0223307
Loading
Please register or sign in to comment