recovery uses IHealth::getService
recovery is_battery_ok function uses get_health_service(),
which calls IHealth::getService("default") then
IHealth::getService("backup").
- An OEM can provide the default instance by installing
android.hardware.health@2.0-impl-<device>.so to recovery
partition.
- If that's not found, the "backup" instance is provided
to the recovery partition by default.
Test: call is_battery_ok() in recovery, successfully
get battery information.
Bug: 80132328
Change-Id: Ibfee80636325a07bc20b24d044d007a60b3dd7c2
diff --git a/Android.bp b/Android.bp
index 630c796..177eeb7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -104,6 +104,7 @@
],
shared_libs: [
+ "android.hardware.health@2.0",
"libbase",
"libbootloader_message",
"libcrypto",
@@ -113,6 +114,8 @@
"libfs_mgr",
"libfusesideload",
"libhidl-gen-utils",
+ "libhidlbase",
+ "libhidltransport",
"liblog",
"libpng",
"libselinux",
@@ -127,20 +130,11 @@
"libminui",
"libverifier",
"libotautil",
+
+ // external dependencies
+ "libhealthhalutils",
"libvintf_recovery",
"libvintf",
-
- // TODO(b/80132328): Remove the dependency on static health HAL.
- "libhealthd.default",
- "android.hardware.health@2.0-impl",
- "android.hardware.health@2.0",
- "android.hardware.health@1.0",
- "android.hardware.health@1.0-convert",
- "libhealthstoragedefault",
- "libhidltransport",
- "libhidlbase",
- "libhwbinder_noltopgo",
- "libbatterymonitor",
],
}