Commit graph

22 commits

Author SHA1 Message Date
Riley Andrews
e4b7b294f3 Add ability to boot from charger mode.
Add the ability to boot up directly from charger mode, instead of forcing
charger mode to initiate a full restart to launch 'full' android. This
should shave a few seconds off of boot time on supported devices (just
manta for now).

Change-Id: Ieec4494d929e92806e039f834d78b9002afd15c4
2014-06-20 16:43:00 -07:00
Doug Zongker
0709917e25 update minui library call
The names of the res_create_* functions have changed.

Change-Id: I9990bb4f6e6dc2d7c62e2cb9e0831532c83b2bb9
2014-03-17 12:23:00 -07:00
Doug Zongker
0280f278f6 remove pixelflinger from healthd
The minui library has changed to no longer use libpixelflinger.  It
also offers a more efficient way of storing and loading frames of
animation; use it to represent the battery-full state images.

Also removes the unused battery_charge.png image.

Bug: 12131110
Change-Id: I6cc8b19f36a806c99cda30cc47b5968daf6b333b

Conflicts:
	charger/charger.c
	charger/images/battery_0.png
	charger/images/battery_1.png
	charger/images/battery_2.png
	charger/images/battery_3.png
	charger/images/battery_4.png
	charger/images/battery_5.png
	charger/images/battery_charge.png
	healthd/Android.mk
2014-03-11 14:45:33 -07:00
Colin Cross
ca0e5044a3 charger: add locale global variable
Some functions in minui reference a global extern char *locale.  None
of them are used by charger, but the bfd linker cannot optimize them
out and fails to link charger.  Define char *locale in charger.c
so it can resolve the symbol.

Change-Id: I738daf95d24356bf96bd226d91a5dc64b5d4dc9b
2014-02-13 12:25:21 -08:00
Doug Zongker
12c45fb9be charger: accomodate minui change
gr_text() now takes an argument requesting bold text instead of
regular.

Change-Id: I18b54f05ae4a89cb753fa5977a870f1bc827b963
2013-03-07 13:35:23 -08:00
Devin Kim
fd8e6504e3 charger: Do not suspend when disconnecting from charger
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
2012-12-07 10:13:51 -08:00
Iliyan Malchev
40156b8a91 charger: fix build
Looks like libsuspend is not available on all platforms.

Change-Id: Ic32dc93221f3c488e846da35235f247f4ddb4c69
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-12-06 17:06:39 -08:00
choongryeol.lee
9255713bcf charger: suspend enable in charger mode
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>
2012-12-06 15:48:52 -08:00
Dima Zavin
209c7b0fad charger: allow devices to skip the initial display blank
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>
2012-10-12 15:13:52 -07:00
Elliott Hughes
b77d3d7249 Always include <sys/socket.h> before <linux/netlink.h>.
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
2012-09-12 10:10:20 -07:00
Dima Zavin
9ec3f3e2e4 charger: make the almost-full frame only show when it's current level
Change-Id: Id53de101dd3c211d376abfd748e7646e28291749
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-31 17:04:33 -07:00
Dima Zavin
471157a393 charger: key state being the same is not an error
Change-Id: I58d53899dbcca8329b65b189c1a6c5eea413c289
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-13 13:04:38 -07:00
Dima Zavin
2d978c01ee charger: ignore key event if value didn't change
Change-Id: Idcb481550eca53209be217361cac38e48368a04f
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-12 16:18:23 -07:00
Dima Zavin
2471a6a395 charger: sync with the current key state on boot
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>
2011-10-12 16:16:07 -07:00
Dima Zavin
d11e1a0278 charger: print last_kmsg directly using klog_write
using the macros introduced extra characters that made things align
poorly.

Change-Id: I4924134be159723b4e4ed905c4293a42358d0ff5
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-12 16:14:00 -07:00
Dima Zavin
7353155717 Revert "charger: show animation when the device is unplugged"
This reverts commit e0c70dad4b.
2011-09-29 17:27:37 -07:00
Dima Zavin
823ebc4d82 charger: dump the last_kmsg when going into charger mode
Change-Id: I3b76bb5071d8a44adfb221774bb304bf296c8c1b
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-29 17:20:44 -07:00
Dima Zavin
1a5ca61b28 charger: use the new asset for almost full, and show full @ 95%
Change-Id: I5f8729260ae068d35d981ff2c16d576c3d4dd82f
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-26 14:14:19 -07:00
Dima Zavin
e0c70dad4b charger: show animation when the device is unplugged
Change-Id: I54af1bc61c73bbc993d1dff37174b16e1de5b7a4
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-25 22:19:49 -07:00
Dima Zavin
0052abdafd charger: update charger UI with official graphics and animation
Change-Id: I1b36fa9e380797fe01812b57ac5d8c2c38857993
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-25 21:20:55 -07:00
Dima Zavin
92312a515b charger: reduce timeout for power-on with power key to 2 secs
Change-Id: I8d3a49678a7fc47282d7ab407722e7c1829e9187
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-16 13:16:04 -07:00
Dima Zavin
f48b23688c core: Add a standalone charger UI binary
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>
2011-09-04 15:41:36 -07:00