audiopolicy: fix voice volume mismatch after headset removal.

During voice call, when headset is removed, new device of primary
output is first set to handset, and voice volume is also
calculated in handset. Later other outputs loop to select new
device and calculate volume in new device, due to inactive output
selects AUDIO_DEVICE_NONE, it uses previous device and set wrong
voice volume.

Fix it by add check to avoid applying volume for inactive output.

Bug: 111196161
Test: manual audio smoke tests.

Change-Id: I4dcc9f6d3442ce5a0a8235c04b4156ad17d373db
1 file changed