storaged: allow register and callback from batteryproperties
Test: adb shell dumpsys storaged
Bug: 33086174
Bug: 34198239
Change-Id: I85d6bd05192a205662f69466d7d6208e8b834eff
diff --git a/private/healthd.te b/private/healthd.te
index 0214c59..fc13e28 100644
--- a/private/healthd.te
+++ b/private/healthd.te
@@ -1,3 +1,6 @@
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
init_daemon_domain(healthd)
+
+# Allow callback to storaged batteryproperties listener
+binder_call(healthd, storaged)
diff --git a/private/storaged.te b/private/storaged.te
index 1d87251..134bec4 100644
--- a/private/storaged.te
+++ b/private/storaged.te
@@ -29,6 +29,10 @@
binder_use(storaged)
binder_call(storaged, system_server)
+# use batteryproperties service
+allow storaged batteryproperties_service:service_manager find;
+binder_call(storaged, healthd)
+
###
### neverallow
###