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

Commit 3193b153 authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Merge "Merge "Ensure self-managed calls use voip audio mode." am: b62aa315...

Merge "Merge "Ensure self-managed calls use voip audio mode." am: b62aa315 am: fd3e10b1" into pi-dev-plus-aosp
am: 6823c8a8

Change-Id: I1352a44cbb55fdeeb79771b27055a70b83a3cbb8
parents b4411d65 6823c8a8
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -1531,6 +1531,14 @@ public abstract class ConnectionService extends Service {
                    new DisconnectCause(DisconnectCause.ERROR, "IMPL_RETURNED_NULL_CONNECTION"));
        }

        boolean isSelfManaged =
                (connection.getConnectionProperties() & Connection.PROPERTY_SELF_MANAGED)
                        == Connection.PROPERTY_SELF_MANAGED;
        // Self-managed Connections should always use voip audio mode; we default here so that the
        // local state within the ConnectionService matches the default we assume in Telecom.
        if (isSelfManaged) {
            connection.setAudioModeIsVoip(true);
        }
        connection.setTelecomCallId(callId);
        if (connection.getState() != Connection.STATE_DISCONNECTED) {
            addConnection(request.getAccountHandle(), callId, connection);
@@ -1570,9 +1578,7 @@ public abstract class ConnectionService extends Service {
                        createIdList(connection.getConferenceables()),
                        connection.getExtras()));

        if (isIncoming && request.shouldShowIncomingCallUi() &&
                (connection.getConnectionProperties() & Connection.PROPERTY_SELF_MANAGED) ==
                        Connection.PROPERTY_SELF_MANAGED) {
        if (isIncoming && request.shouldShowIncomingCallUi() && isSelfManaged) {
            // Tell ConnectionService to show its incoming call UX.
            connection.onShowIncomingCallUi();
        }