The device should be power off when disconnecting from charger.
If the device enter to suspend, the device couldn't handle the power off
process. So the device shouldn't suspend to handle the power off at that time
Bug: 7429504
Change-Id: I9a0a60e53f315cd83550dc730a33bc7bd464ef67
Looks like libsuspend is not available on all platforms.
Change-Id: Ic32dc93221f3c488e846da35235f247f4ddb4c69
Signed-off-by: Iliyan Malchev <malchev@google.com>
To reduce power consumption after charging completion, enable suspend when LCD
is turned off.
Bug: 7429504
Change-Id: I34731dc392661c9051a20cea74f70d94a8aaeb42
Signed-off-by: Iliyan Malchev <malchev@google.com>
The theory behind the blank was that the kernel would not
re-initilize the display on boot (and leave it to whatever
the bootloader configured it to) until after the first
blank request.
On some devices, the bootloader does not turn the screen on,
but it's done by the kernel and thus. This makes the extra blank at
start unnecessary.
Bug: 7319529
Change-Id: I9ad9856186df6e9e23ebbe86e83b641423e16dcb
Signed-off-by: Dima Zavin <dima@android.com>
Newer kernel headers files aren't stand alone. (This has long been true of
glibc's copy, but we only recently updated external/kernel-headers.)
Change-Id: Iebcb40902b2f29fe509e207e2f3a9d02a7e40602
If the power key was down when we booted, we would not have
gotten the down event and thus the device would not have rebooted until
the user released and pressed it again.
Change-Id: Iecb8c3dba773bce4647748715d056e8e1d77f7e0
Signed-off-by: Dima Zavin <dima@android.com>
using the macros introduced extra characters that made things align
poorly.
Change-Id: I4924134be159723b4e4ed905c4293a42358d0ff5
Signed-off-by: Dima Zavin <dima@android.com>
This can be launched from an 'on charger' section in init, which
is processed if androidboot.mode=charger is supplied on kernel
command line.
This is a standalone binary that has a simple "user interface"
and allows the standard production kernel to run while charging.
This removes the burden from the bootloader to get low-power mode
working.
Currently, the device will "power-on" (i.e. reboot) into normal
mode if the power key is pressed for X seconds, and will also
power down the device if the usb/ac cable is removed for Y seconds.
Change-Id: I780594b99211cb09de7f8519a69c5962eb91348a
Signed-off-by: Dima Zavin <dima@android.com>