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

Commit 1ed8f64d authored by Anju Mathapati's avatar Anju Mathapati Committed by Gerrit - the friendly Code Review server
Browse files

IMS:3-way Conf Success but Active call refer fails

Scenario:
A calls B,A calls C,B-Hold, C-Active, Merge
Merge success but only B is added to conference
C is on Hold

UI should display both calls.i.e.Conf call & held call
Since we use Call C's session for new conf call,
report held call as phantom call.

Change-Id: If9fb978c86a509106f55618aa057dd5214a5ea07
CRs-Fixed: 781247
parent a2251cfb
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -411,6 +411,8 @@ public final class CallsManager extends Call.ListenerBase {

    void addNewUnknownCall(PhoneAccountHandle phoneAccountHandle, Bundle extras) {
        Uri handle = extras.getParcelable(TelecomManager.EXTRA_UNKNOWN_CALL_HANDLE);
        String state = extras.getString(TelecomManager.EXTRA_UNKNOWN_CALL_STATE);

        Log.i(this, "addNewUnknownCall with handle: %s", Log.pii(handle));
        Call call = new Call(
                mContext,
@@ -425,11 +427,35 @@ public final class CallsManager extends Call.ListenerBase {
                false /* isConference */);
        call.setConnectTimeMillis(System.currentTimeMillis());
        call.setIsUnknown(true);
        call.setState(convertState(state));
        call.setExtras(extras);
        call.addListener(this);
        call.startCreateConnection(mPhoneAccountRegistrar);
    }


    private int convertState(String state) {
        if (state == null) {
            return CallState.RINGING;
        } else if (state.compareTo("ACTIVE") == 0) {
            return CallState.ACTIVE;
        } else if (state.compareTo("HOLDING") == 0) {
            return CallState.ON_HOLD;
        } else if (state.compareTo("DIALING") == 0) {
            return CallState.DIALING;
        }  else if (state.compareTo("ALERTING") == 0) {
            return CallState.RINGING;
        }  else if (state.compareTo("INCOMING") == 0) {
            return CallState.RINGING;
        }  else if (state.compareTo("DISCONNECTED") == 0) {
            return CallState.DISCONNECTED;
        }  else if (state.compareTo("DISCONNECTING") == 0) {
            return CallState.DISCONNECTING;
        } else {
            return CallState.RINGING;
        }
    }

    /**
     * Kicks off the first steps to creating an outgoing call so that InCallUI can launch.
     *