hal_audio: Allow writing dump info into pipes

The following HAL methods use file descriptors to write dump
info comprising audioflinger debug dump:

IDevice.debugDump
IEffectsFactory.debugDump
IStream.debugDump

Bug: 36074936
Test: check contents of 'adb shell dumpsys media.audio_flinger'
      on -userdebug builds

Change-Id: Ie2bec95c6b73c6f10941e2b0a95a25d6a7a6e4c1
This commit is contained in:
Mikhail Naganov 2017-03-09 14:32:16 -08:00
parent 62acdaa781
commit d7c88ddf5a

View file

@ -20,6 +20,10 @@ r_dir_file(hal_audio, proc)
allow hal_audio audio_device:dir r_dir_perms; allow hal_audio audio_device:dir r_dir_perms;
allow hal_audio audio_device:chr_file rw_file_perms; allow hal_audio audio_device:chr_file rw_file_perms;
# Needed to provide debug dump output via dumpsys' pipes.
allow hal_audio shell:fd use;
allow hal_audio shell:fifo_file write;
# Needed on some devices for playing audio on paired BT device, # Needed on some devices for playing audio on paired BT device,
# but seems appropriate for all devices. # but seems appropriate for all devices.
unix_socket_connect(hal_audio, bluetooth, bluetooth) unix_socket_connect(hal_audio, bluetooth, bluetooth)