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

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

Merge "IMS: Add Participant support"

parents 291bda97 1b5428ae
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -988,6 +988,14 @@ final class Call implements CreateConnectionResponse {
        }
    }

    void addParticipantWithConference(String receipants) {
        if (mConnectionService == null) {
            Log.w(this, "conference requested on a call without a connection service.");
        } else {
            mConnectionService.addParticipantWithConference(this, receipants);
        }
    }

    void mergeConference() {
        if (mConnectionService == null) {
            Log.w(this, "merging conference calls without a connection service.");
+14 −0
Original line number Diff line number Diff line
@@ -90,7 +90,21 @@ public class CallActivity extends Activity {
        if (Intent.ACTION_CALL.equals(action) ||
                Intent.ACTION_CALL_PRIVILEGED.equals(action) ||
                Intent.ACTION_CALL_EMERGENCY.equals(action)) {
        boolean isAddParticipant = intent.getBooleanExtra(
                TelephonyProperties.ADD_PARTICIPANT_KEY, false);
        Log.d(this, "isAddparticipant = "+isAddParticipant);
        if (isAddParticipant) {
            String number = PhoneNumberUtils.getNumberFromIntent(intent, this);
            CallsManager callsManager = CallsManager.getInstance();
            if (callsManager != null) {
                callsManager.addParticipant(number);
                callsManager.getInCallController().bringToForeground(false);
            } else {
                Log.w(this, "CallsManager is null, can't process add Participant");
            }
        } else {
            processOutgoingCallIntent(intent);
        }
        } else if (TelecomManager.ACTION_INCOMING_CALL.equals(action)) {
            processIncomingCallIntent(intent);
        }
+7 −14
Original line number Diff line number Diff line
@@ -570,27 +570,20 @@ public final class CallsManager extends Call.ListenerBase {
    /**
     * Attempts to add participant in a call.
     *
     * @param handle Handle to connect the call with.
     * @param gatewayInfo Optional gateway information that can be used to route the call to the
     *        actual dialed handle via a gateway provider. May be null.
     * @param speakerphoneOn Whether or not to turn the speakerphone on once the call connects.
     * @param videoState The desired video state for the outgoing call.
     * @param number number to connect the call with.
     */
    void addParticipant(Call call, Uri handle, GatewayInfo gatewayInfo, boolean speakerphoneOn,
            int videoState) {
        if (call == null) {
    void addParticipant(String number) {
        Log.i(this, "addParticipant number ="+number);
        if (getForegroundCall() == null) {
            // don't do anything if the call no longer exists
            Log.i(this, "Canceling unknown call.");
            return;
        }

        if (call.getTargetPhoneAccount() != null) {
            // If the account has been set, proceed to place the add participant.
            // Otherwise the connection will be initiated when the account is set by the user.
            call.startCreateConnection(mPhoneAccountRegistrar);
        } else {
            getForegroundCall().addParticipantWithConference(number);
        }
    }


    /**
     * Attempts to start a conference call for the specified call.
     *
+11 −0
Original line number Diff line number Diff line
@@ -1005,6 +1005,17 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> {
        }
    }

    void addParticipantWithConference(Call call, String receipant) {
        final String callId = mCallIdMapper.getCallId(call);
            if (isServiceValid("addParticipantWithConference")) {
                try {
                    logOutgoing("addParticipantWithConference %s, %s", receipant, callId);
                    mServiceInterface.addParticipantWithConference(callId, receipant);
                } catch (RemoteException ignored) {
                }
        }
    }

    void mergeConference(Call call) {
        final String callId = mCallIdMapper.getCallId(call);
        if (callId != null && isServiceValid("mergeConference")) {