OSDN Git Service

Prevent full wake lock from keeping device awake while dreaming.
authorJeff Brown <jeffbrown@google.com>
Tue, 9 Oct 2012 22:47:30 +0000 (15:47 -0700)
committerJeff Brown <jeffbrown@google.com>
Tue, 9 Oct 2012 22:52:31 +0000 (15:52 -0700)
commit10428748f98518dbaef8c56cf1ad75aabd75da45
treece963dc94372a12f2ae582430551d07dfd370f65
parentc0c0c0e612e1ccf1e55eb2a9338ddfff40d8d7f2
Prevent full wake lock from keeping device awake while dreaming.

A dream may itself hold a wake lock in order to keep the screen
bright as it runs.  However this wake lock also causes the device
to stay awake even when it is not plugged in which is undesirable.

This change makes full wake locks behave differently when napping
or dreaming.  The wake lock still keeps the screen bright but
it does not prevent the device from falling asleep.  This is
similar to our policy of ignoring full wake locks completely when
the device is manually put to sleep by the user.

Bug: 7295909
Change-Id: Id99e82d2143ae1a81629281d6407d7527efb8137
services/java/com/android/server/power/PowerManagerService.java