Commit graph

7 commits

Author SHA1 Message Date
Yifan Hong
b5d7033dcc charger: separate UI and HAL access.
Abstract all the HIDL-ness from charger so an AIDL HAL
can later replace the HIDL HAL.

Created libhealthd_charger_ui that is responsible for
UI stuff in charger. Then libhealthd_charger is now the
charger library backed by HIDL HAL.

Bug: 170338625
Bug: 203246116

Test: charger_test

Change-Id: I193bb76afa18b3367f24796ac53b1760650e8683
2021-11-01 12:38:56 -07:00
Yifan Hong
3aa3b3c627 charger: uses health HAL service.
hwservicemanager starts in charger, so directly get the health HAL
service.

Also sets up Android base kernel logging.

Bug: 142674987

Test: turn off device and charge, health HAL starts before charger, and inspect logs
      to confirm charger is reading from health HAL
Test: make health HAL start after charger, and inspect logs to confirm
      charger is reading from health HAL.

Change-Id: I5ba50a4b931735d1d14a50940e37c1e407dda34d
2020-01-31 13:29:21 -08:00
Yifan Hong
97eecdc875 healthd: charger use runtime sysprops instead.
Bug: 124118169
Test: run off-mode charging
Change-Id: Ib71f84f1c93d1566f4e3101920d98b1d39184390
2019-07-24 17:01:40 -07:00
Tao Bao
5747e228f7 healthd: Add charger.recovery module.
This CL splits out healthd_mode_charger_nops for building
charger.recovery. It doesn't change the functionality of the charger
module under recovery, i.e. a) it still doesn't do much work other than
reporting the battery status periodically; b) it keeps calling
device-specific healthd functions (healthd_board_init and
healthd_board_battery_update) via the statically linked HAL.

Previously `charger -r` was used to indicate starting charger under
recovery mode. This CL makes it a noop since we've changed the caller in
recovery.

Bug: 73660730
Bug: 114042635
Test: Boot into charger mode on walleye. Check that charger UI works.
Test: Boot into recovery mode on walleye. Check that /system/bin/charger
      keeps working.
Test: Run charger_test on walleye.
Change-Id: Id91acfcc77ec315c2382392dc54e36c3e85de2eb
2019-03-06 14:41:47 -08:00
Yifan Hong
b7cd45f877 charger: add charger_test
Test: charger_test
Bug: 63702641
Change-Id: Id50d024c015916cb8007742e3c17eaf1161b909f
2017-11-21 15:05:17 -08:00
Yifan Hong
10c2b4013a healthd: charger use health 2.0 HAL
Test: charger_test
Test: off-mode charging, charger runs correctly
Bug: 63702641
Bug: 69268160
Change-Id: I7dfc83ae4020ada7e9d11ab955f648abb74f435b
2017-11-20 10:28:11 -08:00
Sandeep Patil
526f8cf339 healthd: refactor healthd code to split into 'charger' and 'healthd'
This splits healthd code into 2 pieces as described below.

charger - statically linked executable in /sbin
 - responsible for charger-mode UI
 - battery/charger  monitoring in recovery/charger-mode.

healthd - dynamically linked (*mostly*) executable in /system/bin
 - responsible for battery / charger monitoring in Android
 - runs 'batteryproperties' service.

Both currently use libhealthd STATIC HALs. However, this now paves
way for the healthd (android) HAL to be a shared library that can
be trebelized.

   text    data     bss     dec     hex filename
 733356   15312   33864  782532   bf0c4 root/sbin/charger
  55943   10392     192   66527   103df system/bin/healthd
 789299   25704   34056  849059   cf4a3 (TOTALS)

Test: Tested recovery, charge-only and android boot with new binaries
with and without STATIC HAL.

Change-Id: I80f94948dda44d466f172d234b3fcc9064ef2476
Signed-off-by: Sandeep Patil <sspatil@google.com>
2016-11-08 07:36:07 -08:00