From acc930d104534dff89d5e336d22d2310069ca7c2 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Wed, 4 Mar 2015 10:08:29 -0800 Subject: audiopolicy: Do not route VoIP call to HDMI getDeviceForStrategy is returning AUDIO_DEVICE_OUT_AUX_DIGITAL even when setForceUse is called with FORCE_NONE(earpiece) during VOIP call. Actual Intention is to route audio for phone strategy to AUX device even after setForceUse is called with FORCE_NONE when not in voice call. It is supposed to exclude VOIP call too. Bug: 19522164. Change-Id: I88d515c351f066305f9eed240b1fe5f60ef34f85 --- services/audiopolicy/managerdefault/AudioPolicyManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services') diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp index b48dc80..53ec0f6 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp @@ -4467,7 +4467,7 @@ audio_devices_t AudioPolicyManager::getDeviceForStrategy(routing_strategy strate if (device) break; device = availableOutputDeviceTypes & AUDIO_DEVICE_OUT_USB_DEVICE; 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_DGTL_DOCK_HEADSET; -- cgit v1.1