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

Commit fe6d79e0 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Auto-enable speaker phone when pulling a video call.

When pulling a video call, auto-enable the speakerphone.
Do this in the onExternalCallChanged listener in CallAudioManager, since
the video state will have not changed (the external call would have video
state).

Bug: 29942171
Change-Id: Ifbd66af897ada0da5c88aa498839da0b0bf3c917
parent b489d6c2
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -184,6 +184,14 @@ public class CallAudioManager extends CallsManagerListenerBase {
        } else if (!isExternalCall) {
            Log.d(LOG_TAG, "Adding external call which was pulled with ID %s", call.getId());
            addCall(call);

            if (mCallsManager.isSpeakerphoneAutoEnabledForVideoCalls(call.getVideoState())) {
                // When pulling a video call, automatically enable the speakerphone.
                Log.d(LOG_TAG, "Switching to speaker because external video call %s was pulled." +
                        call.getId());
                mCallAudioRouteStateMachine.sendMessageWithSessionInfo(
                        CallAudioRouteStateMachine.SWITCH_SPEAKER);
            }
        }
    }