Merge "add rules for RilConfigService"
diff --git a/vendor/qcom/common/file_contexts b/vendor/qcom/common/file_contexts
index d32ce87..3a6be48 100644
--- a/vendor/qcom/common/file_contexts
+++ b/vendor/qcom/common/file_contexts
@@ -198,6 +198,8 @@
# Vendor libs that are exposed to apps (those listed in /vendor/etc/public.libraries.txt
# and their dependencies)
+#
+/vendor/lib(64)?/libOpenCL-pixel\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libOpenCL\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libadsprpc\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libcdsprpc\.so u:object_r:same_process_hal_file:s0
diff --git a/vendor/qcom/sdm710/file_contexts b/vendor/qcom/sdm710/file_contexts
index 99d9f42..b798baa 100644
--- a/vendor/qcom/sdm710/file_contexts
+++ b/vendor/qcom/sdm710/file_contexts
@@ -53,3 +53,6 @@
# libs
/vendor/lib(64)?/hw/gralloc\.sdm710\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/hw/vulkan\.sdm710\.so u:object_r:same_process_hal_file:s0
+
+#Android NN Driver
+/vendor/bin/hw/android\.hardware\.neuralnetworks@1\.1-service-qti u:object_r:hal_neuralnetworks_default_exec:s0
diff --git a/vendor/qcom/sdm710/hal_neuralnetworks.te b/vendor/qcom/sdm710/hal_neuralnetworks.te
new file mode 100644
index 0000000..7f90c11
--- /dev/null
+++ b/vendor/qcom/sdm710/hal_neuralnetworks.te
@@ -0,0 +1,18 @@
+type hal_neuralnetworks_default, domain;
+hal_server_domain(hal_neuralnetworks_default, hal_neuralnetworks)
+
+type hal_neuralnetworks_default_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(hal_neuralnetworks_default)
+
+allow hal_neuralnetworks_default fwk_sensor_hwservice:hwservice_manager find;
+allow hal_neuralnetworks_default qdsp_device:chr_file r_file_perms;
+allow hal_neuralnetworks_default ion_device:chr_file r_file_perms;
+
+allow hal_neuralnetworks_default app_data_file:file { read getattr };
+allow hal_neuralnetworks_default shell_data_file:file { read getattr };
+allow hal_neuralnetworks_default hal_neuralnetworks_data_file:dir create_dir_perms;
+allow hal_neuralnetworks_default hal_neuralnetworks_data_file:{ file fifo_file } create_file_perms;
+allow hal_neuralnetworks_default gpu_device:chr_file rw_file_perms;
+
+r_dir_file(hal_neuralnetworks_default, sysfs_soc)
+r_dir_file(hal_neuralnetworks_default, adsprpcd_file)