Allow hal_sensors to use ashmem from android.hidl.allocator
android.framework.sensorservice@1.0 pass a file
descriptor from hidl_memory into
android.hardware.sensors@1.0, hence requiring the latter
to use the file descriptor.
Test: VtsHalSensorManagerV1_0TargetTest under selinux
enforcing mode
Bug: 35219747
Change-Id: I0185c8af0714776842c90ebb687b684324b55cd8
diff --git a/public/hal_sensors.te b/public/hal_sensors.te
index 0d6dfe0..567b0be 100644
--- a/public/hal_sensors.te
+++ b/public/hal_sensors.te
@@ -3,3 +3,7 @@
# Allow sensor hals to access ashmem memory allocated by apps
allow hal_sensors { appdomain -isolated_app }:fd use;
+
+# Allow sensor hals to access ashmem memory allocated by android.hidl.allocator
+# fd is passed in from framework sensorservice HAL.
+allow hal_sensors hal_allocator:fd use;