audioservice: special mute behavior for BT SCO volume

Allow muting BT SCO volume only from explicit mute request and not
when stream volume index is set to 0. This is to match BT requirement
that the valid SCO volume range is 0 to 15 and let the headset deal with
actual attenuation for index 0.
If explicitly muted via adjustStreamVolume() from an app with permission
MODIFY_PHONE_STATE, then we set the audio policy stream volume to 0 and
effectively mute RX path.

Also change default value of Settings.System.MUTE_STREAMS_AFFECTED
to include AudioManager.STREAM_BLUETOOTH_SCO.

Bug: 111195322
Test: test volume changes in call over BT SCO
Change-Id: I3b6560bbd1bcbb01a29aa746f23bae74329a1fa7
2 files changed