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

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

Merge "IMS: Fix two addParticipant requests send to RIL" into LA.BF64.1

parents 14c651fe dca94407
Loading
Loading
Loading
Loading
+1 −20
Original line number Diff line number Diff line
@@ -239,7 +239,7 @@ class NewOutgoingCallIntentBroadcaster {
            return DisconnectCause.INVALID_NUMBER;
        }

        if (!processAddParticipant(intent, number) && callImmediately) {
        if (callImmediately) {
            Log.i(this, "Placing call immediately instead of waiting for "
                    + " OutgoingCallBroadcastReceiver: %s", intent);
            String scheme = isUriNumber ? PhoneAccount.SCHEME_SIP : PhoneAccount.SCHEME_TEL;
@@ -261,25 +261,6 @@ class NewOutgoingCallIntentBroadcaster {
        return DisconnectCause.NOT_DISCONNECTED;
    }

    private boolean processAddParticipant(Intent intent, String handle) {
        boolean ret = false;
        boolean isUriNumber = PhoneNumberUtils.isUriNumber(handle);
        if (intent.getBooleanExtra(TelephonyProperties.ADD_PARTICIPANT_KEY, false)) {
            String scheme = isUriNumber ? PhoneAccount.SCHEME_SIP : PhoneAccount.SCHEME_TEL;
            boolean speakerphoneOn = mIntent.getBooleanExtra(
                    TelecomManager.EXTRA_START_CALL_WITH_SPEAKERPHONE, false);
            int videoState = mIntent.getIntExtra(
                    TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE,
                    VideoProfile.VideoState.AUDIO_ONLY);

            mCallsManager.addParticipant(mCall, Uri.fromParts(scheme, handle, null), null,
                    speakerphoneOn, videoState);
            ret = true;
        }
        Log.d(this, "processAddParticipant return = " + ret);
        return ret;
    }

    /**
     * Sends a new outgoing call ordered broadcast so that third party apps can cancel the
     * placement of the call or redirect it to a different number.