diff options
author | Yifan Hong <elsk@google.com> | 2019-10-08 17:27:11 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2019-10-30 13:48:08 -0700 |
commit | 7dcf7b063942fd74914b5eb3d79a8f16de67a781 (patch) | |
tree | 36515fb6e1d9037fdefade0941f810697679a6e5 /code_coverage/empty_policy | |
parent | f16a98165b1bda873448164e05381def3d013df8 (diff) |
healthd: Remove libhealthd dependency from charger
Clean up charger's libhealthd dependency.
- Charger uses libhealthloop to maintain an infinite
loop, similar to all health 2.x services.
- Charger tries to open up health 2.1 HAL implementation
to retrieve health info. If it failed, it falls back
to the legacy code path where a default BatteryMonitor
is used, *except* that it won't depend on libhealthd's
healthd_board_init() and healthd_board_battery_update()
anymore.
- Remove global static variables because they are hard to
track.
- Modernize code by converting charger_state in to a C++
Charger class, transforming all functions into methods,
and moving all other global states into the class.
- Devices that matches all of the following:
- have a customized libhealthd (search for modules
named libhealthd.xxxx)
- uses charger from system image (look for "class charger"
in device init.rc scripts; if you see the binary is named
"/charger" or "/system/bin/charger" then you are using
charger from system image)
... must implement health 2.1 passthrough implementation
properly in order to have charger continue to work.
See hardware/interfaces/health/2.1/README.md for details.
Test: charger test
Test: manual charger mode
Bug: 127677771
Bug: 142286265
Change-Id: I0f26e5c1fe2be6b5952fc019224457c8419e43e4
Diffstat (limited to 'code_coverage/empty_policy')
0 files changed, 0 insertions, 0 deletions