policy: fix voice volume is set wrong after device switch
During voice call, when device switch from speaker to headset,
first new device of primary output is set to headset, voice
volume is calculated in headset, and then it is applied for
voice call correctly. Later, other outputs loop to select new
device and caculate volume in new device. Due to inactive output
selectes AUIOD_DEVICE_NONE, it causes wrong voice volume is
calculated to set.
Fix it by add check to avoid applying volume for inactive output.
Change-Id: I092d870fe5e32c324c953e595cfbc5fce5696321
1 file changed