Skip to content
Snippets Groups Projects
Commit 3c46d2ff authored by Philip Cuadra's avatar Philip Cuadra
Browse files

Allow Bluetooth sys_nice and system_server setsched for Bluetooth HAL

Bluetooth needs the capability to set audio-related threads to be RT
scheduled.  Grant it sys_nice.

system_server needs to set priority for the Bluetooth HAL.  Allow it.

Bug 37518404
Test:  Play Bluetooth audio, confirm RT scheduling with systrace
Merged-In: Iaf7b85a11a51883744d72a50addfd320b6fbbc2f
Change-Id: Iaf7b85a11a51883744d72a50addfd320b6fbbc2f

(cherry picked from commit 6eee6eb2)
parent a9d7b895
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,9 @@ allow bluetooth system_api_service:service_manager find; ...@@ -57,6 +57,9 @@ allow bluetooth system_api_service:service_manager find;
# /data/data/com.android.shell/files/bugreports/bugreport-*. # /data/data/com.android.shell/files/bugreports/bugreport-*.
allow bluetooth shell_data_file:file read; 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_bluetooth)
hal_client_domain(bluetooth, hal_telephony) hal_client_domain(bluetooth, hal_telephony)
...@@ -69,6 +72,6 @@ read_runtime_log_tags(bluetooth) ...@@ -69,6 +72,6 @@ read_runtime_log_tags(bluetooth)
### ###
# Superuser capabilities. # Superuser capabilities.
# bluetooth requires net_{admin,raw,bind_service} and wake_alarm and block_suspend. # 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 }; neverallow bluetooth self:capability ~{ net_admin net_raw net_bind_service sys_nice};
neverallow bluetooth self:capability2 ~{ wake_alarm block_suspend }; neverallow bluetooth self:capability2 ~{ wake_alarm block_suspend };
...@@ -98,6 +98,7 @@ allow system_server appdomain:process { sigkill signal }; ...@@ -98,6 +98,7 @@ allow system_server appdomain:process { sigkill signal };
allow system_server appdomain:process { getsched setsched }; allow system_server appdomain:process { getsched setsched };
allow system_server audioserver:process { getsched setsched }; allow system_server audioserver:process { getsched setsched };
allow system_server hal_audio: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 cameraserver:process { getsched setsched };
allow system_server hal_camera:process { getsched setsched }; allow system_server hal_camera:process { getsched setsched };
allow system_server mediaserver:process { getsched setsched }; allow system_server mediaserver:process { getsched setsched };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment