summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-12-16 12:01:12 -0800
committerEric Laurent <elaurent@google.com>2014-12-16 12:01:48 -0800
commitcd71a69d922eab2929faf8f5652fcd1b9a29cbe8 (patch)
treebbfebd1725b93f6dfe90bf23b64ae17be6f0776f /services/audiopolicy
parent8975220e28f632c5db4d89c798384d7635228bbc (diff)
downloadframeworks_av-cd71a69d922eab2929faf8f5652fcd1b9a29cbe8.zip
frameworks_av-cd71a69d922eab2929faf8f5652fcd1b9a29cbe8.tar.gz
frameworks_av-cd71a69d922eab2929faf8f5652fcd1b9a29cbe8.tar.bz2
audio: Force audio to Speaker if requested during VOIP call
getDeviceForStrategy is returning AUDIO_DEVICE_OUT_USB even when setForceUse is called with Speaker during VOIP call. Actual Intention is to route audio for phone strategy to USB device even after setForceUse is called with Speaker when not in voice call. It is supposed to exclude VOIP call too Added additional check for MODE_IN_COMMUNICATION so that it returns SPEAKER when setForceUse is called with speaker Bug: 18758599 Change-Id: I1c51128cc1c7bfce1cf6f1fde60b428d3a9379fc
Diffstat (limited to 'services/audiopolicy')
-rw-r--r--services/audiopolicy/AudioPolicyManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp
index 744556d..d2b0bcb 100644
--- a/services/audiopolicy/AudioPolicyManager.cpp
+++ b/services/audiopolicy/AudioPolicyManager.cpp
@@ -4566,7 +4566,7 @@ audio_devices_t AudioPolicyManager::getDeviceForStrategy(routing_strategy strate
device = availableOutputDeviceTypes & AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER;
if (device) break;
}
- if (mPhoneState != AUDIO_MODE_IN_CALL) {
+ if (!isInCall()) {
device = availableOutputDeviceTypes & AUDIO_DEVICE_OUT_USB_ACCESSORY;
if (device) break;
device = availableOutputDeviceTypes & AUDIO_DEVICE_OUT_USB_DEVICE;