summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2022-02-21 04:48:01 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-02-21 04:48:01 +0000
commitaadfae0cdd4c232b7eeafc4502b0ff68cf73fdac (patch)
treeb57f09409683ecd84e1b1b11cb69eaaaada8abb0
parente51bc2e33ead06defef99b3be16009f5d553dc21 (diff)
parentd95565f08c01e7df4e359371e7ca79d05ff6859b (diff)
downloadpixel-sepolicy-aadfae0cdd4c232b7eeafc4502b0ff68cf73fdac.tar.gz
Merge changes I3ea34185,Ic4f433a9
* changes: Allow cs40l26 HAL and dumpsys to access sysfs_vibrator Allow the cs40l26 audio coupled haptics
-rw-r--r--vibrator/cs40l26/file_contexts3
-rw-r--r--vibrator/cs40l26/hal_vibrator_default.te10
2 files changed, 12 insertions, 1 deletions
diff --git a/vibrator/cs40l26/file_contexts b/vibrator/cs40l26/file_contexts
index 13513c9..5c9f669 100644
--- a/vibrator/cs40l26/file_contexts
+++ b/vibrator/cs40l26/file_contexts
@@ -1,2 +1,5 @@
/vendor/bin/hw/android\.hardware\.vibrator-service\.cs40l26 u:object_r:hal_vibrator_default_exec:s0
/vendor/bin/hw/android\.hardware\.vibrator-service\.cs40l26-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/cs40l26/hal_vibrator_default.te b/vibrator/cs40l26/hal_vibrator_default.te
index 963a1c9..478bee9 100644
--- a/vibrator/cs40l26/hal_vibrator_default.te
+++ b/vibrator/cs40l26/hal_vibrator_default.te
@@ -1,5 +1,13 @@
-allow hal_vibrator_default input_device:dir search;
+allow hal_vibrator_default input_device:dir r_dir_perms;
allow hal_vibrator_default input_device:chr_file rw_file_perms;
+allow hal_vibrator_default sysfs_vibrator:dir search;
+allow hal_vibrator_default sysfs_vibrator:file rw_file_perms;
+
+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;
+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 mnt_vendor_file:dir search;
allow hal_vibrator_default persist_file:dir search;