cd4e427980
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