Allow hal_audio to set scheduling policy for its threads

Audio HAL server needs to set SCHED_FIFO scheduling policy
for its threads that communicate with FastMixer threads of
AudioFlinger that use the same scheduler.

Bug: 30222631
Change-Id: I405a69d097a6bfed455e3483365b27c4004e1063
diff --git a/public/hal_audio.te b/public/hal_audio.te
index b40427c..ca8fe52 100644
--- a/public/hal_audio.te
+++ b/public/hal_audio.te
@@ -1,5 +1,7 @@
 hwbinder_use(hal_audio)
+binder_use(hal_audio)
 binder_call(hal_audio, audioserver)
+binder_call(hal_audio, system_server)
 
 allow hal_audio ion_device:chr_file r_file_perms;
 
@@ -15,6 +17,8 @@
 allow hal_audio audio_device:dir r_dir_perms;
 allow hal_audio audio_device:chr_file rw_file_perms;
 
+allow hal_audio scheduling_policy_service:service_manager find;
+
 # Needed on some devices for playing audio on paired BT device,
 # but seems appropriate for all devices.
 unix_socket_connect(hal_audio, bluetooth, bluetooth)
diff --git a/public/system_server.te b/public/system_server.te
index c0802e8..6bbe991 100644
--- a/public/system_server.te
+++ b/public/system_server.te
@@ -91,6 +91,7 @@
 # Set scheduling info for apps.
 allow system_server { appdomain ephemeral_app }:process { getsched setsched };
 allow system_server audioserver:process { getsched setsched };
+allow system_server hal_audio:process { getsched setsched };
 allow system_server cameraserver:process { getsched setsched };
 allow system_server mediaserver:process { getsched setsched };
 allow system_server bootanim:process { getsched setsched };