diff --git a/private/bluetooth.te b/private/bluetooth.te index 4742a5b43b0e9828d43d9b0bc4b36a4da31cacde..451d27af09347698ac8a10c1628ea7f843d617a7 100644 --- a/private/bluetooth.te +++ b/private/bluetooth.te @@ -56,6 +56,9 @@ allow bluetooth system_api_service:service_manager find; # /data/data/com.android.shell/files/bugreports/bugreport-*. allow bluetooth shell_data_file:file read; +# Bluetooth audio needs RT scheduling to meet deadlines, allow sys_nice +allow bluetooth self:capability sys_nice; + hal_client_domain(bluetooth, hal_bluetooth) hal_client_domain(bluetooth, hal_telephony) @@ -68,6 +71,6 @@ read_runtime_log_tags(bluetooth) ### # Superuser capabilities. -# bluetooth requires net_{admin,raw,bind_service} and wake_alarm and block_suspend. -neverallow bluetooth self:capability ~{ net_admin net_raw net_bind_service }; +# Bluetooth requires net_{admin,raw,bind_service} and wake_alarm and block_suspend and sys_nice. +neverallow bluetooth self:capability ~{ net_admin net_raw net_bind_service sys_nice}; neverallow bluetooth self:capability2 ~{ wake_alarm block_suspend }; diff --git a/private/system_server.te b/private/system_server.te index afca1f6ed5e412653e0fbeee5d73ded1b8f8b2e7..c4d17ef99a7ce91f9a0582ac62a320a884ea5cea 100644 --- a/private/system_server.te +++ b/private/system_server.te @@ -98,6 +98,7 @@ allow system_server appdomain:process { sigkill signal }; allow system_server appdomain:process { getsched setsched }; allow system_server audioserver:process { getsched setsched }; allow system_server hal_audio:process { getsched setsched }; +allow system_server hal_bluetooth:process { getsched setsched }; allow system_server cameraserver:process { getsched setsched }; allow system_server hal_camera:process { getsched setsched }; allow system_server mediaserver:process { getsched setsched };