From 9788e83cd70046dbf051ec16abc3635492c7f232 Mon Sep 17 00:00:00 2001
From: Yifan Hong <elsk@google.com>
Date: Fri, 2 Jun 2017 13:59:39 -0700
Subject: [PATCH] selinux changes for android.hardware.health@2.0

health@2.0 is a service used by BatteryService in framework.

Test: health hal works

Change-Id: I6cccf3ab085686fd67b0e048aaf201e64ec311c4
---
 private/system_server.te | 1 +
 vendor/file_contexts     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/private/system_server.te b/private/system_server.te
index 2478ee933..2f045bcd0 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -190,6 +190,7 @@ hal_client_domain(system_server, hal_contexthub)
 hal_client_domain(system_server, hal_fingerprint)
 hal_client_domain(system_server, hal_gnss)
 hal_client_domain(system_server, hal_graphics_allocator)
+hal_client_domain(system_server, hal_health)
 hal_client_domain(system_server, hal_ir)
 hal_client_domain(system_server, hal_light)
 hal_client_domain(system_server, hal_memtrack)
diff --git a/vendor/file_contexts b/vendor/file_contexts
index 1efbe73d0..7ad0c8532 100644
--- a/vendor/file_contexts
+++ b/vendor/file_contexts
@@ -17,6 +17,7 @@
 /(vendor|system/vendor)/bin/hw/android\.hardware\.graphics\.allocator@2\.0-service   u:object_r:hal_graphics_allocator_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.graphics\.composer@2\.1-service    u:object_r:hal_graphics_composer_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.health@1\.0-service         u:object_r:hal_health_default_exec:s0
+/(vendor|system/vendor)/bin/hw/android\.hardware\.health@2\.0-service         u:object_r:hal_health_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.ir@1\.0-service             u:object_r:hal_ir_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.keymaster@3\.0-service      u:object_r:hal_keymaster_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service          u:object_r:hal_light_default_exec:s0
-- 
GitLab