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

Commit e9ec8774 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 63af5ac7 1ed8f64d
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.
     *