Merge "Sepolicy: Set genfs context for modem restart_level"
diff --git a/generic/vendor/common/qtidataservices_app.te b/generic/vendor/common/qtidataservices_app.te
index 906e606..5599294 100644
--- a/generic/vendor/common/qtidataservices_app.te
+++ b/generic/vendor/common/qtidataservices_app.te
@@ -45,6 +45,7 @@
binder_call(qtidataservices_app, cnd)
binder_call(qtidataservices_app, rild)
+binder_call(qtidataservices_app, location)
net_domain(qtidataservices_app)
hal_client_domain(qtidataservices_app, hal_perf)
diff --git a/generic/vendor/common/system_server.te b/generic/vendor/common/system_server.te
index e147c11..588dcbd 100644
--- a/generic/vendor/common/system_server.te
+++ b/generic/vendor/common/system_server.te
@@ -49,4 +49,7 @@
# allow system_server to access vendor display property.
get_prop(system_server, vendor_display_prop)
+# allow system_server to read/acess peripheral manager.
+get_prop(system_server, vendor_per_mgr_state_prop);
+
hal_client_domain(system_server, hal_dataconnection_qti)
diff --git a/generic/vendor/kona/file_contexts b/generic/vendor/kona/file_contexts
index 5228e42..4e5f4d7 100644
--- a/generic/vendor/kona/file_contexts
+++ b/generic/vendor/kona/file_contexts
@@ -89,6 +89,9 @@
# Block devices for the drive that holds the xbl_a and xbl_b partitions.
/dev/block/platform/soc/1d84000.ufshc/sd[bc] u:object_r:xbl_block_device:s0
+#Android NN Driver
+/vendor/bin/hw/android\.hardware\.neuralnetworks@1\.2-service-qti u:object_r:hal_neuralnetworks_default_exec:s0
+
# Same process file
/vendor/lib(64)?/hw/gralloc\.kona\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/hw/vulkan\.kona\.so u:object_r:same_process_hal_file:s0
diff --git a/generic/vendor/kona/hal_neuralnetworks.te b/generic/vendor/kona/hal_neuralnetworks.te
new file mode 100644
index 0000000..25d753f
--- /dev/null
+++ b/generic/vendor/kona/hal_neuralnetworks.te
@@ -0,0 +1,45 @@
+# Copyright (c) 2019, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+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 xdsp_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 map };
+allow hal_neuralnetworks_default shell_data_file:file { read getattr map };
+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, adsprpcd_file)
diff --git a/qva/private/file_contexts b/qva/private/file_contexts
index 817dccd..63e3eaa 100755
--- a/qva/private/file_contexts
+++ b/qva/private/file_contexts
@@ -44,7 +44,6 @@
/system/product/bin/dpmd u:object_r:dpmd_exec:s0
/system/bin/dun-server u:object_r:dun-server_exec:s0
/system/bin/bt_logger u:object_r:bt_logger_exec:s0
-/system/bin/smcinvoked u:object_r:smcinvoke_daemon_exec:s0
/system/bin/qvrservice u:object_r:qvrd_exec:s0
/system/bin/wfdservice u:object_r:wfdservice_exec:s0
/system/bin/mmi u:object_r:vendor_mmi_sys_exec:s0