Allow the charging animation to be customized with a configuration file
and custom assets.
- Add a parser to parse a custom configuration file.
- Add support for showing a clock and the battery percentage.
- Expand feature that conditionally shows animation frames using min_level
and level_only to min_level and max_level
BUG: 29547343
Change-Id: Ia33f4bb37dc7d4c7fa6507a63481e93bf0bf9738
In readFromFile() when a newline is not found in the data, we reset
the initial character of the buffer to \0, but leave the count as is
(something >0 in this case).
Later in getBooleanField() we could erroneously treat a response as
"true" because count would be >0 and the initial value of buf would
be != '0' (set to \0 in this case).
To fixup error paths such as this, we can simplify readFromFile
by using android::base functions: ReadFromFileString() and Trim().
NOTES:
- Converted char * buffers used with readFromFile to std::string
- Removed unused variable btech from BatteryMonitor::update
Testing Done:
- Build healthd and recovery for angler device
- Confirm that known values are being read correctly from kernel
sysfs.
Change-Id: I238bbff097543767f352aa084bf0acbc1324baca
Signed-off-by: Michael Scott <michael.scott@linaro.org>
When creating static libs with healthd logic, explicitly
reference libbinder to pick up its header include paths.
Bug: 27804373
Test: healthd libs compile when libbinder's header include
paths change.
Change-Id: I1014eb0b73d06815c42a527c4ea7e63c35ca3530
Boards can opt to have charger mode be passive, with no screen UI or key
processing, the same as for recovery mode, via BOARD_CHARGER_NO_UI. The
minui and associated libs and charging image files are not built into the
executable in this case.
Always select charger No UI operation for Brillo devices.
Bug: 27170356
Change-Id: Ibe71498743353b01ce5b6521e42ed94d75547547
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
Previously because /sbin/healthd does not exist on the build host, make
always tries to rebuild the symlink even in an already-up-to-date tree.
Change-Id: I41201282281476b14eaf4c7d9b2e09fe367c1422
* Add healthd charger mode ops
* Check for executable invocation as "charger", set charger mode if so
* Incorporate charger executable as healthd charger mode
Change-Id: I4a44e7a4c3a65ae9be94491f7f498aa48d4f8a84
* add ops for different "modes" of healthd operation: android vs. recovery
* recovery mode selected by runstring options -r
* binder/Android communication moved to android mode
* recovery mode ops avoiding binder service registration
* "no service manager" flag removed; now handled by android vs. other modes
Change-Id: I3d8c89bf96a18a6a00cc85306f9a07d3f408f2a0
Initially moving battery health monitoring here.
Command line flag -n tells healthd not to use (or wait for) servicemanager
in this execution, for charger and recovery modes.
Change-Id: I1720594724af0c068497b359f9c6ad65aeaa1519