From 61670b8623a2eaaedc03f8486140750c2aa7fd5d Mon Sep 17 00:00:00 2001 From: Jin Qian <jinqian@google.com> Date: Mon, 6 Feb 2017 11:04:31 -0800 Subject: [PATCH] storaged: allow register and callback from batteryproperties Test: adb shell dumpsys storaged Bug: 33086174 Bug: 34198239 Change-Id: I85d6bd05192a205662f69466d7d6208e8b834eff --- private/healthd.te | 3 +++ private/storaged.te | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/private/healthd.te b/private/healthd.te index 0214c59f8..fc13e28fd 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 1d87251fd..134bec468 100644 --- a/private/storaged.te +++ b/private/storaged.te @@ -29,6 +29,10 @@ add_service(storaged, storaged_service) binder_use(storaged) binder_call(storaged, system_server) +# use batteryproperties service +allow storaged batteryproperties_service:service_manager find; +binder_call(storaged, healthd) + ### ### neverallow ### -- GitLab