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

Commit 1d1d91c3 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Ims: Add support to add participants to existing call am: 8771b583

Change-Id: Ic3699a1b297906089b7069c3609311d480f65973
parents bca7b458 8771b583
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2555,6 +2555,15 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        }
    }

    public void addConferenceParticipants(List<Uri> participants) {
        if (mConnectionService == null) {
            Log.w(this, "adding conference participants without a connection service.");
        } else if (can(Connection.CAPABILITY_ADD_PARTICIPANT)) {
            Log.addEvent(this, LogUtils.Events.ADD_PARTICIPANT);
            mConnectionService.addConferenceParticipants(this, participants);
        }
    }

    /**
     * Initiates a request to the connection service to pull this call.
     * <p>
+12 −0
Original line number Diff line number Diff line
@@ -1680,6 +1680,18 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        }
    }

    void addConferenceParticipants(Call call, List<Uri> participants) {
        final String callId = mCallIdMapper.getCallId(call);
        if (callId != null && isServiceValid("addConferenceParticipants")) {
            try {
                logOutgoing("addConferenceParticipants %s", callId);
                mServiceInterface.addConferenceParticipants(callId, participants,
                        Log.getExternalSession());
            } catch (RemoteException ignored) {
            }
        }
    }

    @VisibleForTesting
    public void pullExternalCall(Call call) {
        final String callId = mCallIdMapper.getCallId(call);
+23 −0
Original line number Diff line number Diff line
@@ -473,6 +473,29 @@ class InCallAdapter extends IInCallAdapter.Stub {
        }
    }

    @Override
    public void addConferenceParticipants(String callId, List<Uri> participants) {
        try {
            Log.startSession("ICA.aCP", mOwnerPackageName);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
                    Call call = mCallIdMapper.getCall(callId);
                    if (call != null) {
                        call.addConferenceParticipants(participants);
                    } else {
                        Log.w(this, "addConferenceParticipants, unknown call id: %s", callId);
                    }
                }
            } finally {
                Binder.restoreCallingIdentity(token);
            }
        } finally {
            Log.endSession();
        }
    }


    @Override
    public void pullExternalCall(String callId) {
        try {
+1 −0
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ public class LogUtils {
        public static final String CONFERENCE_WITH = "CONF_WITH";
        public static final String SPLIT_FROM_CONFERENCE = "CONF_SPLIT";
        public static final String SWAP = "SWAP";
        public static final String ADD_PARTICIPANT = "ADD_PARTICIPANT";
        public static final String ADD_CHILD = "ADD_CHILD";
        public static final String REMOVE_CHILD = "REMOVE_CHILD";
        public static final String SET_PARENT = "SET_PARENT";
+3 −1
Original line number Diff line number Diff line
@@ -514,7 +514,9 @@ public class ParcelableCallUtils {
        android.telecom.Call.Details.CAPABILITY_CAN_PULL_CALL,

        Connection.CAPABILITY_SUPPORT_DEFLECT,
        android.telecom.Call.Details.CAPABILITY_SUPPORT_DEFLECT
        android.telecom.Call.Details.CAPABILITY_SUPPORT_DEFLECT,
        Connection.CAPABILITY_ADD_PARTICIPANT,
        android.telecom.Call.Details.CAPABILITY_ADD_PARTICIPANT
    };

    private static int convertConnectionToCallCapabilities(int connectionCapabilities) {
Loading