Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33ade411 authored by Divya Narayanan Poojary's avatar Divya Narayanan Poojary Committed by Ethan Chen
Browse files

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

Added isInCall check so that it returns EARPIECE when
setForceUse is called with FORCE_NONE

CRs-Fixed: 793649

Change-Id: I88d515c351f066305f9eed240b1fe5f60ef34f85
parent 8b91c593
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -4829,7 +4829,7 @@ audio_devices_t AudioPolicyManager::getDeviceForStrategy(routing_strategy strate
            if (device) break;
            if (device) break;
            device = availableOutputDeviceTypes & AUDIO_DEVICE_OUT_USB_DEVICE;
            device = availableOutputDeviceTypes & AUDIO_DEVICE_OUT_USB_DEVICE;
            if (device) break;
            if (device) break;
            if (mPhoneState != AUDIO_MODE_IN_CALL) {
            if (!isInCall()) {
                device = availableOutputDeviceTypes & AUDIO_DEVICE_OUT_USB_ACCESSORY;
                device = availableOutputDeviceTypes & AUDIO_DEVICE_OUT_USB_ACCESSORY;
                if (device) break;
                if (device) break;
                device = availableOutputDeviceTypes & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET;
                device = availableOutputDeviceTypes & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET;