Hold partial wakelock during shutdown to avoid entering sleep
authorMattias Larsson <mattias7.larsson@sonyericsson.com>
Tue, 28 Sep 2010 12:34:15 +0000 (14:34 +0200)
committerJohan Redestig <johan.redestig@sonyericsson.com>
Tue, 28 Sep 2010 14:40:20 +0000 (16:40 +0200)
commitcd4e4279804288a941c308b88df8bafa4f3f7458
treeaa216e7c136d1319558a8aacc4f952416fc4a923
parent7d9c73fb6f6f79f7f92b77482a0edbd7b89f2564
Hold partial wakelock during shutdown to avoid entering sleep

The ShutdownThread can get suspended while in progress if the
device enters sleep by the user pressing the power-key, or if it is
started (in sleep) from the BatteryService upon a dead battery
notification. If the device is woken up before the battery is
drained, the ShutdownThread will resume and finally complete
the shutdown, but if not the phone will stay in sleep until the
battery level is so low that the power is ruthlessly cut.

Change-Id: If64429fd0c98a9136141942be6c337b5c79cf4f1
core/java/com/android/internal/app/ShutdownThread.java