healthd provides health@2.0 service.
* remove binder calls to healthd (storaged, system_server)
* Allow healthd to serve health HAL
Bug: 62229583
Test: no health related denials
Test: VTS health test
Test: BatteryManagerTest
Change-Id: I0cf1872c0ba69e7de7c3f529d548f9ffe39812ac
diff --git a/private/healthd.te b/private/healthd.te
index 0693a3a..20d0791 100644
--- a/private/healthd.te
+++ b/private/healthd.te
@@ -2,5 +2,5 @@
init_daemon_domain(healthd)
-# Allow callback to storaged batteryproperties listener
-binder_call(healthd, storaged)
+# Allow healthd to serve health HAL
+hal_server_domain(healthd, hal_health)
diff --git a/private/storaged.te b/private/storaged.te
index 8da1f26..96d59d9 100644
--- a/private/storaged.te
+++ b/private/storaged.te
@@ -40,9 +40,7 @@
binder_use(storaged)
binder_call(storaged, system_server)
-# use batteryproperties service
-allow storaged batteryproperties_service:service_manager find;
-binder_call(storaged, healthd)
+hal_client_domain(storaged, hal_health)
# Implements a dumpsys interface.
allow storaged dumpstate:fd use;