sepolicy: Add selinux rules for NFC HAL

Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I6a831b136eefd283cb57c57221762519288bbc1f
diff --git a/basic/non_plat/file.te b/basic/non_plat/file.te
index b7220ad..696f1b1 100644
--- a/basic/non_plat/file.te
+++ b/basic/non_plat/file.te
@@ -436,6 +436,7 @@
 type mediaserver_data_file, file_type, data_file_type;
 type mediacodec_data_file, file_type, data_file_type;
 type connsyslog_data_vendor_file, file_type, data_file_type;
+type nfc_data_vendor_file, file_type, data_file_type;
 
 # AAO
 type data_vendor_aao_file, file_type, data_file_type;
diff --git a/basic/non_plat/file_contexts b/basic/non_plat/file_contexts
index 194232d..c7ea3d7 100644
--- a/basic/non_plat/file_contexts
+++ b/basic/non_plat/file_contexts
@@ -24,6 +24,7 @@
 /data/mdlog(/.*)?                   u:object_r:mdlog_data_file:s0
 /data/mdl(/.*)?                     u:object_r:mdlog_data_file:s0
 /data/mdl3(/.*)?                    u:object_r:mdlog_data_file:s0
+/data/vendor/nfc(/.*)?              u:object_r:nfc_data_vendor_file:s0
 /data/nfc_socket(/.*)?              u:object_r:nfc_socket_file:s0
 /data/vendor/nfc_socket(/.*)?       u:object_r:vendor_nfc_socket_file:s0
 /data/vendor/md3(/.*)?              u:object_r:c2k_file:s0
diff --git a/basic/non_plat/hal_nfc_default.te b/basic/non_plat/hal_nfc_default.te
new file mode 100644
index 0000000..336ef10
--- /dev/null
+++ b/basic/non_plat/hal_nfc_default.te
@@ -0,0 +1,2 @@
+allow hal_nfc_default nfc_data_vendor_file:dir create_dir_perms;
+allow hal_nfc_default nfc_data_vendor_file:file create_file_perms;