Add policy support for /dev/diag

Change-Id: I4f19adec0f5b41051e7cb662f8a182a2fc3f6298
diff --git a/BoardConfig.mk b/BoardConfig.mk
index f835bb4..4ac7bc6 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -101,6 +101,7 @@
        drmserver.te \
        file_contexts \
        keystore.te \
+       rild.te \
        surfaceflinger.te \
        system.te \
        ueventd.te \
diff --git a/sepolicy/device.te b/sepolicy/device.te
index 8a27c68..2342e2d 100644
--- a/sepolicy/device.te
+++ b/sepolicy/device.te
@@ -4,3 +4,4 @@
 # Qualcomm Secure Execution Environment Communicator (QSEECOM) device
 type qseecom_device, dev_type;
 
+type diag_device, dev_type;
diff --git a/sepolicy/rild.te b/sepolicy/rild.te
new file mode 100644
index 0000000..4ba75e9
--- /dev/null
+++ b/sepolicy/rild.te
@@ -0,0 +1 @@
+allow rild diag_device:chr_file rw_file_perms;
diff --git a/sepolicy/system.te b/sepolicy/system.te
index 676b2c0..5d112f9 100644
--- a/sepolicy/system.te
+++ b/sepolicy/system.te
@@ -1,2 +1,3 @@
 # Grant GPU access to system apps (e.g., PowerManagerService)
 allow system gpu_device:chr_file rw_file_perms;
+allow system diag_device:chr_file rw_file_perms;