BatteryMonitor: get battery health data from sys file nodes
Requirements for battery health aidl hal v2, include sysfs nodes:
- Battery state of health
- Charging state
- Charging policy
- Date of manufacturing of the battery
- Date of first use of the battery
and functions
- setChargingPolicy
- getChargingPolicy
- getBatteryHealthData
Bug: 251425963
Test: m
Change-Id: I210dc403ba95b1b75759227f84bc32f32be1bbaf
Signed-off-by: Jack Wu <wjack@google.com>
diff --git a/healthd/Android.bp b/healthd/Android.bp
index 76b6ad0..9b5d05f 100644
--- a/healthd/Android.bp
+++ b/healthd/Android.bp
@@ -76,7 +76,7 @@
name: "libbatterymonitor",
defaults: ["libbatterymonitor_defaults"],
static_libs: [
- "android.hardware.health-V1-ndk",
+ "android.hardware.health-V2-ndk",
],
whole_static_libs: [
// Need to translate HIDL to AIDL to support legacy APIs in
@@ -202,12 +202,12 @@
defaults: ["libhealthd_charger_ui_defaults"],
static_libs: [
- "android.hardware.health-V1-ndk",
+ "android.hardware.health-V2-ndk",
"android.hardware.health-translate-ndk",
],
export_static_lib_headers: [
- "android.hardware.health-V1-ndk",
+ "android.hardware.health-V2-ndk",
],
}
@@ -279,7 +279,7 @@
static_libs: [
// common
"android.hardware.health@1.0-convert",
- "android.hardware.health-V1-ndk",
+ "android.hardware.health-V2-ndk",
"libbatterymonitor",
"libcharger_sysprop",
"libhealthd_charger_nops",