From 7df44d82767ea036a71ecca0dd936eb55d8b9216 Mon Sep 17 00:00:00 2001
From: Peng Xu <pengxu@google.com>
Date: Fri, 1 Apr 2016 17:01:25 -0700
Subject: [PATCH] Allow all apps to discover contexthub_service

This allows system app, regular app as well as test app to access
ContextHubManager API. Additional "signature|privilige" permission
requirement (LOCATION_HARDWARE) still exist to prevent security
issues, misuse and abuse.

Change-Id: I47f3d243a3de7f1202c933fc715a935c43cf319b
---
 priv_app.te | 1 -
 service.te  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/priv_app.te b/priv_app.te
index b2b9e579a..58016195a 100644
--- a/priv_app.te
+++ b/priv_app.te
@@ -36,7 +36,6 @@ allow priv_app app_api_service:service_manager find;
 allow priv_app system_api_service:service_manager find;
 allow priv_app persistent_data_block_service:service_manager find;
 allow priv_app recovery_service:service_manager find;
-allow priv_app contexthub_service:service_manager find;
 
 # Traverse into /mnt/media_rw for bypassing FUSE daemon
 # TODO: narrow this to just MediaProvider
diff --git a/service.te b/service.te
index bd6ab38b0..3cd258b6c 100644
--- a/service.te
+++ b/service.te
@@ -35,7 +35,7 @@ type battery_service, system_server_service, service_manager_type;
 type bluetooth_manager_service, app_api_service, system_server_service, service_manager_type;
 type cameraproxy_service, system_server_service, service_manager_type;
 type clipboard_service, app_api_service, system_server_service, service_manager_type;
-type contexthub_service, system_server_service, service_manager_type;
+type contexthub_service, app_api_service, system_server_service, service_manager_type;
 type IProxyService_service, app_api_service, system_server_service, service_manager_type;
 type commontime_management_service, system_server_service, service_manager_type;
 type connectivity_service, app_api_service, system_server_service, service_manager_type;
-- 
GitLab