summaryrefslogtreecommitdiff
authorRobin Lee <rgl@google.com>2020-06-10 11:41:33 (GMT)
committer Android Partner Code Review <android-gerrit-partner@google.com>2020-06-10 11:41:33 (GMT)
commitc924afc6a77b4a05c4fe5173c5d62f41db14d7ed (patch)
tree37b068234d2e4237e6f6c10498ba785411159436
parente6680f28318b587dd46ea2c3cd84e235be3fe80e (diff)
parent6614b5a4ccba68a28641eb76e0f3b661d4dd9aae (diff)
downloadcommon-c924afc6a77b4a05c4fe5173c5d62f41db14d7ed.zip
common-c924afc6a77b4a05c4fe5173c5d62f41db14d7ed.tar.gz
common-c924afc6a77b4a05c4fe5173c5d62f41db14d7ed.tar.bz2
Merge "NTS: fix UI lantency issue [8/14]" into q-tv-r1-dev
Diffstat
-rw-r--r--sepolicy/file_contexts3
-rw-r--r--sepolicy/hal_audio_amlogic.te61
-rw-r--r--sepolicy/hal_drm_default.te1
3 files changed, 63 insertions, 2 deletions
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 79b29d0..1ac746f 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -308,10 +308,9 @@
/vendor/bin/hw/android\.hardware\.power\.stats@1\.0-service\.mock u:object_r:hal_power_stats_default_exec:s0
/vendor/bin/hw/android\.hardware\.graphics\.composer@2\.3-service\.droidlogic u:object_r:hal_graphics_composer_default_exec:s0
/vendor/bin/hw/android\.hardware\.thermal@2\.0-service.droidlogic u:object_r:hal_thermal_default_exec:s0
-/vendor/bin/hw/android\.hardware\.audio@2\.0-service-droidlogic u:object_r:hal_audio_default_exec:s0
+/vendor/bin/hw/android\.hardware\.audio@2\.0-service-droidlogic u:object_r:hal_audio_amlogic_exec:s0
/vendor/bin/hw/android\.hardware\.oemlock@1\.0-service\.droidlogic u:object_r:hal_oemlock_default_exec:s0
-
/data/vendor/mediadrm(/.*)? u:object_r:hal_drm_data:s0
/vendor/lib(64)?/hw/gralloc\.amlogic\.so u:object_r:same_process_hal_file:s0
diff --git a/sepolicy/hal_audio_amlogic.te b/sepolicy/hal_audio_amlogic.te
new file mode 100644
index 0000000..01266b2
--- a/dev/null
+++ b/sepolicy/hal_audio_amlogic.te
@@ -0,0 +1,61 @@
+#########################################
+# sepolicy rules for hal_audio_amlogic
+#########################################
+type hal_audio_amlogic, domain;
+hal_server_domain(hal_audio_amlogic, hal_audio)
+
+type hal_audio_amlogic_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(hal_audio_amlogic)
+
+hal_client_domain(hal_audio_amlogic, hal_allocator)
+
+# allow audioserver to call hal_audio dump with its own fd to retrieve status
+allow hal_audio_amlogic audioserver:fifo_file write;
+
+allow hal_audio_amlogic sysfs_audio_cap:file { read open };
+allow hal_audio_amlogic sysfs_digital_codec:file { write read open };
+allow hal_audio_amlogic sysfs_amhdmitx:dir search;
+allow hal_audio_amlogic kernel:system { module_request };
+allow hal_audio_amlogic media_prop:file { read open getattr };
+allow hal_audio_amlogic media_prop:property_service { set };
+allow hal_audio_amlogic shell_data_file:file { read write };
+allow hal_audio_amlogic sysfs_xbmc:file { read open write };
+allow hal_audio_amlogic hidraw_device:chr_file { create read write open ioctl};
+allow hal_audio_amlogic property_socket:sock_file { write };
+allow hal_audio_amlogic init:unix_stream_socket { connectto };
+allow hal_audio_amlogic sysfs_video:file { read open };
+allow hal_audio_amlogic sysfs_video:dir search;
+#--------------------------------------------------------------------#
+# product_shipping_api_level=28
+#--------------------------------------------------------------------#
+get_prop(hal_audio_amlogic, vendor_platform_prop)
+allow hal_audio_amlogic self:capability sys_nice;
+allow hal_audio_amlogic sysfs_aud_output_chs:file { open read write };
+allow hal_audio_amlogic sysfs_aud_output_chs:file { read write open };
+allow hal_audio_amlogic remotecontrol_hwservice:hwservice_manager find;
+allow hal_audio_amlogic sysfs:file { open read write };
+allow hal_audio_amlogic sysfs_extcon:dir { search };
+allow hal_audio_amlogic uio_device:chr_file { open read write };
+allow hal_audio_amlogic system_app:binder call;
+allow hal_audio_amlogic tv_prop:file { read getattr open };
+allow hal_audio_amlogic hidraw_audio_device:chr_file { create read write open ioctl};
+allow hal_audio_amlogic device:dir {read open};
+allow hal_audio_amlogic btmic_data_file:dir {write read open add_name search};
+allow hal_audio_amlogic btmic_data_file:file {write open create};
+#[SEI-zhaopf-2018-12-18]add for hbg remote {
+allow hal_audio_amlogic sysfs:dir { open read };
+allow hal_audio_amlogic vendor_data_file:dir { add_name remove_name write };
+allow hal_audio_amlogic vendor_data_file:lnk_file { read };
+allow hal_audio_amlogic vendor_data_file:file { create read open setattr unlink};
+allow hal_audio_amlogic dvb_device:chr_file { open read write ioctl };
+allow hal_audio_amlogic frontend_device:chr_file { open read write ioctl };
+allow hal_audio_amlogic codec_device:chr_file { read write open ioctl };
+#allow hal_audio_amlogic hidraw_audio_device:chr_file { create read write open ioctl};
+#allow hal_audio_amlogic device:dir{ read };
+#allow hal_audio_amlogic default_prop:file{ read };
+#[SEI-zhaopf-2018-12-18]add for hbg remote }
+allow hal_audio_amlogic sysfs_astream:file { open read };
+allow hal_audio_amlogic sysfs_astream:dir { search };
+allow hal_audio_amlogic sysfs_audio:file { read write open };
+#allow hal_audio_amlogic bluetooth:unix_stream_socket connectto;
+allow hal_audio_amlogic self:netlink_kobject_uevent_socket { create bind setopt read };
diff --git a/sepolicy/hal_drm_default.te b/sepolicy/hal_drm_default.te
index 1a8fdf8..fc3bc73 100644
--- a/sepolicy/hal_drm_default.te
+++ b/sepolicy/hal_drm_default.te
@@ -4,5 +4,6 @@ allow hal_drm_default vndbinder_device:chr_file { read write open ioctl };
allow hal_drm_default drm_device:chr_file { read open write ioctl };
allow hal_drm_default hal_drm_data:file { read open write getattr create unlink rename };
allow hal_drm_default hal_drm_data:dir { read open write getattr create search add_name remove_name rmdir};
+allow hal_drm_default self:capability sys_nice;
get_prop(hal_drm_default, media_prop)