audio policy: fix music glitch with touch sounds
There is a brief music interruption when a touch sound
is played the first time after the headset insertion.
This is due to a bug in audio policy manager logic to prevent
volume bursts while changing device while music is playing.
The fix consists in muting music only on current output stream
when changing device, not all output streams.
Also prevent unecessary device change if the requested device
is not supported by the output stream profile.
Bug: 8301565
Change-Id: I00daab19bbdda10ca856a05fa32a1e333e1b9469
1 file changed