From d1a9a2f41947c926574734058a21e45874eccc28 Mon Sep 17 00:00:00 2001
From: Peng Xu <pengxu@google.com>
Date: Thu, 27 Apr 2017 15:23:08 -0700
Subject: [PATCH] Allow sensor to use gralloc handle and access ion device

Allow sensor hal to sue gralloc handle and access ion device
so that sensor direct report feature can function correctly when
HardwareBuffer shared memory is used.

Test: SensorDirectReportTest passes without setenforce 0

Change-Id: I2068f6f4a8ac15da40126892e1326e0b90a6576f
Merged-In: I2068f6f4a8ac15da40126892e1326e0b90a6576f
---
 vendor/hal_sensors_default.te | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/vendor/hal_sensors_default.te b/vendor/hal_sensors_default.te
index 8379c8279..7fd8f8561 100644
--- a/vendor/hal_sensors_default.te
+++ b/vendor/hal_sensors_default.te
@@ -5,3 +5,6 @@ type hal_sensors_default_exec, exec_type, vendor_file_type, file_type;
 init_daemon_domain(hal_sensors_default)
 
 allow hal_sensors_default fwk_scheduler_hwservice:hwservice_manager find;
+
+allow hal_sensors_default hal_graphics_allocator_default:fd use;
+allow hal_sensors_default ion_device:chr_file r_file_perms;
-- 
GitLab