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

Commit 1519cfc8 authored by Rahul Arya's avatar Rahul Arya Committed by Android (Google) Code Review
Browse files

Merge "Fix CDMA conference active call inference" into tm-qpr-dev

parents a36410d1 730cb6c6
Loading
Loading
Loading
Loading
+30 −28
Original line number Diff line number Diff line
@@ -713,11 +713,11 @@ public class BluetoothInCallService extends InCallService {
        }

        BluetoothCall conferenceCall = getBluetoothCallById(call.getParentId());
        if (!mCallInfo.isNullCall(conferenceCall)
                && conferenceCall.hasProperty(Call.Details.PROPERTY_GENERIC_CONFERENCE)) {
        if (!mCallInfo.isNullCall(conferenceCall)) {
            isPartOfConference = true;

            // Run some alternative states for Conference-level merge/swap support.
            if (conferenceCall.hasProperty(Call.Details.PROPERTY_GENERIC_CONFERENCE)) {
                // Run some alternative states for CDMA Conference-level merge/swap support.
                // Basically, if BluetoothCall supports swapping or merging at the conference-level,
                // then we need to expose the calls as having distinct states
                // (ACTIVE vs CAPABILITY_HOLD) or
@@ -726,7 +726,8 @@ public class BluetoothInCallService extends InCallService {
                // Before doing any special logic, ensure that we are dealing with an
                // ACTIVE BluetoothCall and that the conference itself has a notion of
                // the current "active" child call.
            BluetoothCall activeChild = getBluetoothCallById(
                BluetoothCall activeChild =
                        getBluetoothCallById(
                                conferenceCall.getGenericConferenceActiveChildCallId());
                if (state == CALL_STATE_ACTIVE && !mCallInfo.isNullCall(activeChild)) {
                    // Reevaluate state if we can MERGE or if we can SWAP without previously having
@@ -741,12 +742,13 @@ public class BluetoothInCallService extends InCallService {
                        if (call == activeChild) {
                            state = CALL_STATE_ACTIVE;
                        } else {
                        // At this point we know there is an "active" child and we know that it is
                        // not this call, so set it to HELD instead.
                            // At this point we know there is an "active" child and we know that it
                            // is not this call, so set it to HELD instead.
                            state = CALL_STATE_HELD;
                        }
                    }
                }
            }
            if (conferenceCall.getState() == Call.STATE_HOLDING
                    && conferenceCall.can(Connection.CAPABILITY_MANAGE_CONFERENCE)) {
                // If the parent IMS CEP conference BluetoothCall is on hold, we should mark