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>