audio policy: fix in call volume problem.

When switching audio path, it is sometimes required
to temporarily mute certain streams to avoid glitches.
The unmute command is sent with a delay but the volume applied
when unmuting is computed according to the state at the time of mute.
If the device selection changes after the delayed unmute is programmed
the new volume will not correspond to the new device.

setStreamMute() now accepts a device selection as input parameter which is
used instead of current device for volume computation.

Bug 6497819.

Change-Id: I355ebf9e1afe814fa5c2723bda9c40e58f921b46
2 files changed