Merge "rebalance_interrupts sepolicy" into sc-dev
diff --git a/vibrator/common/device.te b/vibrator/common/device.te
new file mode 100644
index 0000000..3460c8c
--- /dev/null
+++ b/vibrator/common/device.te
@@ -0,0 +1 @@
+type vibrator_snd_device, dev_type;
diff --git a/vibrator/cs40l25/file_contexts b/vibrator/cs40l25/file_contexts
index adcc5c6..4cc9af0 100644
--- a/vibrator/cs40l25/file_contexts
+++ b/vibrator/cs40l25/file_contexts
@@ -1,2 +1,5 @@
 /vendor/bin/hw/android\.hardware\.vibrator-service\.cs40l25        u:object_r:hal_vibrator_default_exec:s0
 /vendor/bin/hw/android\.hardware\.vibrator-service\.cs40l25-dual   u:object_r:hal_vibrator_default_exec:s0
+
+/dev/snd/pcmC0D24p                                                 u:object_r:vibrator_snd_device:s0
+/dev/snd/pcmC1D24p                                                 u:object_r:vibrator_snd_device:s0
diff --git a/vibrator/cs40l25/hal_vibrator_default.te b/vibrator/cs40l25/hal_vibrator_default.te
index 3d337bf..219a6b1 100644
--- a/vibrator/cs40l25/hal_vibrator_default.te
+++ b/vibrator/cs40l25/hal_vibrator_default.te
@@ -2,6 +2,13 @@
 
 allow hal_vibrator_default mnt_vendor_file:dir search;
 allow hal_vibrator_default persist_file:dir search;
+
+allow hal_vibrator_default vibrator_snd_device:chr_file rw_file_perms;
+allow hal_vibrator_default vibrator_snd_device:dir search;
+allow hal_vibrator_default audio_device:dir search;
+allow hal_vibrator_default proc_asound:dir search;
+allow hal_vibrator_default proc_asound:file r_file_perms;
+
 r_dir_file(hal_vibrator_default, persist_haptics_file)
 
 get_prop(hal_vibrator_default, vendor_vibrator_prop);