platform_system_core/healthd
Yifan Hong 7dcf7b0639 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
2019-10-30 13:48:08 -07:00
..
api Implement sysprop_library API stability check 2019-08-20 16:16:40 +09:00
images remove pixelflinger from healthd 2014-03-11 12:25:41 -07:00
include/healthd [REFACTOR] healthd: BatteryMonitor use health 2.1 types 2019-10-23 14:55:35 -07:00
tests Allow customization of charger animation 2016-09-12 21:07:27 -07:00
Android.bp healthd: Remove libhealthd dependency from charger 2019-10-30 13:48:08 -07:00
android.hardware.health@2.0-service.rc health: Add CAP_WAKE_ALARM to service via init 2019-01-04 02:24:41 +01:00
Android.mk healthd: Remove libhealthd dependency from charger 2019-10-30 13:48:08 -07:00
animation.h healthd: Remove libhealthd dependency from charger 2019-10-30 13:48:08 -07:00
AnimationParser.cpp healthd: remove unused variable. 2019-07-24 17:01:40 -07:00
AnimationParser.h Allow customization of charger animation 2016-09-12 21:07:27 -07:00
BatteryMonitor.cpp healthd: partially fill in health 2.1 HAL fields 2019-10-23 14:55:35 -07:00
charger.cpp healthd: charger use runtime sysprops instead. 2019-07-24 17:01:40 -07:00
charger.sysprop healthd: charger use runtime sysprops instead. 2019-07-24 17:01:40 -07:00
charger_test.cpp healthd: Remove libhealthd dependency from charger 2019-10-30 13:48:08 -07:00
charger_utils.cpp healthd: Remove libhealthd dependency from charger 2019-10-30 13:48:08 -07:00
charger_utils.h healthd: Remove libhealthd dependency from charger 2019-10-30 13:48:08 -07:00
healthd.rc healthd: add healthd.rc 2018-04-04 14:08:04 -07:00
healthd_draw.cpp healthd: charger use runtime sysprops instead. 2019-07-24 17:01:40 -07:00
healthd_draw.h charger: minui error handling fixups 2018-07-30 08:45:52 -07:00
healthd_mode_charger.cpp healthd: Remove libhealthd dependency from charger 2019-10-30 13:48:08 -07:00
healthd_mode_charger.h healthd: Remove libhealthd dependency from charger 2019-10-30 13:48:08 -07:00
healthd_mode_charger_nops.cpp healthd: Remove libhealthd dependency from charger 2019-10-30 13:48:08 -07:00
healthd_mode_charger_nops.h healthd: Add charger.recovery module. 2019-03-06 14:41:47 -08:00
HealthServiceDefault.cpp healthd: move HealthServiceCommon 2018-01-22 12:34:04 -08:00
HealthServiceHealthd.cpp healthd: move HealthServiceCommon 2018-01-22 12:34:04 -08:00
manifest_healthd.xml healthd use vintf_fragments 2018-07-17 11:57:38 -07:00
OWNERS healthd: update owners 2019-01-28 14:55:39 -08:00