From 76e97d3950f2654adbb0a415218b6d048200c395 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Wed, 26 Sep 2012 18:50:09 -0700 Subject: audio policy: force device update if disconnected Force the new device selection to be applied when a device is disconnected even if none is select. This is to indicate to the audio HAL that current device selection is not valid anymore even if no new device is selected because no audio track is active. Bug 7141149. Change-Id: Iade02fb53a4cc2051fce9da07870c5391396b696 --- audio/AudioPolicyManagerBase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'audio') diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp index 4e0d60f..8e3fb0c 100644 --- a/audio/AudioPolicyManagerBase.cpp +++ b/audio/AudioPolicyManagerBase.cpp @@ -169,7 +169,10 @@ status_t AudioPolicyManagerBase::setDeviceConnectionState(audio_devices_t device updateDevicesAndOutputs(); for (size_t i = 0; i < mOutputs.size(); i++) { - setOutputDevice(mOutputs.keyAt(i), getNewDevice(mOutputs.keyAt(i), true /*fromCache*/)); + setOutputDevice(mOutputs.keyAt(i), + getNewDevice(mOutputs.keyAt(i), true /*fromCache*/), + true, + 0); } if (device == AUDIO_DEVICE_OUT_WIRED_HEADSET) { -- cgit v1.1