OSDN Git Service

Implement auto-sleep functionality.
authorJeff Brown <jeffbrown@google.com>
Wed, 1 Oct 2014 03:54:30 +0000 (20:54 -0700)
committerJeff Brown <jeffbrown@google.com>
Wed, 1 Oct 2014 22:01:10 +0000 (15:01 -0700)
commit05af6adb8d4fd5ea069c9aead5a877da9085daa8
treecb9331ddd75e62406ef56874bd3f3d01f5ef3bcc
parent496aeb1a6156f3c089135a7ce4fab550589eaff7
Implement auto-sleep functionality.

Added a new SLEEP_TIMEOUT setting which governs how long the device will
remain awake or dreaming without user activity.  By default this
value is set to -1 which maintains today's existing behavior.

We basically represent the time we are allowed to be dreaming as a new
kind of user activity summary state called DREAM, similar to BRIGHT
and DIM.  When the sleep timeout expires, the state is cleared and
the dream ends.

Bug: 17665809
Change-Id: I59aa7648dcec215f1285464fc1134934a09230e5
core/java/android/provider/Settings.java
packages/SettingsProvider/res/values/defaults.xml
packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
services/core/java/com/android/server/power/PowerManagerService.java