Merge "QSPA AIDL test client sepolicy changes"
diff --git a/qva/vendor/common/file_contexts b/qva/vendor/common/file_contexts
index f7e64b4..f0e58e9 100644
--- a/qva/vendor/common/file_contexts
+++ b/qva/vendor/common/file_contexts
@@ -26,9 +26,8 @@
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Changes from Qualcomm Innovation Center are provided under the following license:
-# Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+# Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause-Clear
-
###################################
#Dev nodes
#
@@ -161,6 +160,7 @@
/vendor/bin/hw/android\.hardware\.usb\.gadget\@1\.[0-2]-service-qti u:object_r:vendor_hal_usb_qti_exec:s0
/vendor/bin/usbsecure u:object_r:vendor_usb_qti_exec:s0
/vendor/bin/vendor\.qti\.qspmhal@1\.0-service u:object_r:vendor_hal_qspmhal_default_exec:s0
+/vendor/bin/vendor\.qti\.qspa-service u:object_r:vendor_hal_qspa_default_exec:s0
/vendor/bin/qesdk-manager u:object_r:vendor_hal_qesdhal_default_exec:s0
/(vendor|system/vendor)/bin/qms u:object_r:vendor_qms_exec:s0
/(vendor|system/vendor)/bin/hw/qvrservice u:object_r:vendor_qvrd_vndr_exec:s0
diff --git a/qva/vendor/common/hal_qspa.te b/qva/vendor/common/hal_qspa.te
new file mode 100644
index 0000000..674d00a
--- /dev/null
+++ b/qva/vendor/common/hal_qspa.te
@@ -0,0 +1,18 @@
+# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-3-Clause-Clear
+
+type vendor_hal_qspa_default, domain;
+type vendor_hal_qspa_default_exec, vendor_file_type, exec_type, file_type;
+
+init_daemon_domain(vendor_hal_qspa_default)
+binder_use(vendor_hal_qspa_default);
+
+hal_server_domain(vendor_hal_qspa_default, vendor_hal_qspa_qti)
+hal_attribute_service(vendor_hal_qspa_qti, vendor_hal_qspa_service)
+
+binder_call(vendor_hal_qspa_qti_server, vendor_hal_qspa_qti_client);
+binder_call(vendor_hal_qspa_qti_client, vendor_hal_qspa_qti_server);
+
+binder_use(vendor_hal_qspa_qti_client);
+
+allow vendor_hal_qspa_default vendor_sysfs_devicetree_cpu:dir { open read search };
diff --git a/qva/vendor/common/service.te b/qva/vendor/common/service.te
index 9069ba8..e2d60d6 100644
--- a/qva/vendor/common/service.te
+++ b/qva/vendor/common/service.te
@@ -58,6 +58,10 @@
# 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.
+#
+# Changes from Qualcomm Innovation Center are provided under the following license:
+# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-3-Clause-Clear
type vendor_dun_service, service_manager_type;
type vendor_imsrcs_service, service_manager_type;
@@ -66,3 +70,4 @@
type vendor_hal_dataconnection_service, vendor_service, protected_service, service_manager_type;
type vendor_hal_qms_service, vendor_service, protected_service, service_manager_type;
type vendor_hal_bttpi_service, vendor_service, protected_service, service_manager_type;
+type vendor_hal_qspa_service, vendor_service, protected_service, service_manager_type;
diff --git a/qva/vendor/common/service_contexts b/qva/vendor/common/service_contexts
index 5bda821..23229b2 100644
--- a/qva/vendor/common/service_contexts
+++ b/qva/vendor/common/service_contexts
@@ -58,6 +58,10 @@
# 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.
+#
+# Changes from Qualcomm Innovation Center are provided under the following license:
+# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-3-Clause-Clear
vendor.qti.hardware.qxr.IQXRCoreService/default u:object_r:vendor_hal_qvrd_service:s0
vendor.qti.hardware.qxr.IQXRCamService/default u:object_r:vendor_hal_qvrd_service:s0
@@ -74,4 +78,5 @@
android.hardware.security.keymint.IRemotelyProvisionedComponent/strongbox u:object_r:hal_keymint_service:s0
vendor.qti.gnss.ILocAidlGnss/default u:object_r:hal_gnss_service:s0
vendor.qti.qhcp.IQHDC/default u:object_r:vendor_hal_qms_service:s0
+vendor.qti.hardware.qspa.IQspa/default u:object_r:vendor_hal_qspa_service:s0
diff --git a/qva/vendor/test/file_contexts b/qva/vendor/test/file_contexts
index 25c9da0..047bb39 100644
--- a/qva/vendor/test/file_contexts
+++ b/qva/vendor/test/file_contexts
@@ -24,6 +24,10 @@
# 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.
+#
+# Changes from Qualcomm Innovation Center are provided under the following license:
+# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-3-Clause-Clear
/vendor/bin/Loopback_native u:object_r:vendor_qtiloopback_native_exec:s0
/vendor/bin/qttestservice u:object_r:vendor_qttestservice_exec:s0
@@ -41,3 +45,6 @@
# QESDK SAMPLE CLIENT
/vendor/bin/qsap_sampleclient u:object_r:vendor_qesdk_sampleclient_exec:s0
+
+#QSPA SAMPLE CLIENT
+/vendor/bin/qspa-testclient u:object_r:vendor_qspa_testclient_exec:s0
\ No newline at end of file
diff --git a/qva/vendor/test/qspa-testclient.te b/qva/vendor/test/qspa-testclient.te
new file mode 100644
index 0000000..84a30a8
--- /dev/null
+++ b/qva/vendor/test/qspa-testclient.te
@@ -0,0 +1,9 @@
+# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-3-Clause-Clear
+
+type vendor_qspa_testclient, domain;
+type vendor_qspa_testclient_exec, vendor_file_type, exec_type, file_type;
+
+init_daemon_domain(vendor_qspa_testclient);
+
+hal_client_domain(vendor_qspa_testclient,vendor_hal_qspa_qti);
\ No newline at end of file