README.md
1# libhealthhalutils
2
3A convenience library for (hwbinder) clients of health HAL to choose between
4the "default" instance (served by vendor service) or "backup" instance (served
5by healthd). C++ clients of health HAL should use this library instead of
6calling `IHealth::getService()` directly.
7
8Its Java equivalent can be found in `BatteryService.HealthServiceWrapper`.
9
10# libhealthservice
11
12Common code for all (hwbinder) services of the health HAL, including healthd and
13vendor health service `android.hardware.health@2.0-service(.<vendor>)`. `main()` in
14those binaries calls `health_service_main()` directly.
15
16# libhealthstoragedefault
17
18Default implementation for storage related APIs for (hwbinder) services of the
19health HAL. If an implementation of the health HAL do not wish to provide any
20storage info, include this library. Otherwise, it should implement the following
21two functions:
22
23```c++
24void get_storage_info(std::vector<struct StorageInfo>& info) {
25 // ...
26}
27void get_disk_stats(std::vector<struct DiskStats>& stats) {
28 // ...
29}
30```
31