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

Commit d4e44d94 authored by Divya Narayanan Poojary's avatar Divya Narayanan Poojary Committed by Gerrit - the friendly Code Review server
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 0b81bd35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4989,7 +4989,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;