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

Commit 1cc859d6 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 4c733aa8 458b2abd
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -154,6 +154,13 @@ public abstract class Conference implements IConferenceable {
     */
    public void onSeparate(Connection connection) {}

    /**
     * Invoked when the conference adds a participant to the conference call.
     *
     * @param participant The participant to be added with conference call.
     */
    public void onAddParticipant(String participant) {}

    /**
     * Invoked when the specified {@link Connection} should merged with the conference call.
     *
+28 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ public abstract class ConnectionService extends Service {
    private static final int MSG_SET_LOCAL_HOLD = 20;
    private static final int MSG_SET_ACTIVE_SUB = 21;
    private static final int MSG_DEFLECT = 22;
    private static final int MSG_ADD_PARTICIPANT_WITH_CONFERENCE = 23;

    private static Connection sNullConnection;

@@ -211,6 +212,14 @@ public abstract class ConnectionService extends Service {
            mHandler.obtainMessage(MSG_SPLIT_FROM_CONFERENCE, callId).sendToTarget();
        }

        @Override
        public void addParticipantWithConference(String callId, String participant) {
            SomeArgs args = SomeArgs.obtain();
            args.arg1 = callId;
            args.arg2 = participant;
            mHandler.obtainMessage(MSG_ADD_PARTICIPANT_WITH_CONFERENCE, args).sendToTarget();
        }

        @Override
        public void mergeConference(String callId) {
            mHandler.obtainMessage(MSG_MERGE_CONFERENCE, callId).sendToTarget();
@@ -350,6 +359,17 @@ public abstract class ConnectionService extends Service {
                case MSG_SPLIT_FROM_CONFERENCE:
                    splitFromConference((String) msg.obj);
                    break;
                case MSG_ADD_PARTICIPANT_WITH_CONFERENCE: {
                    SomeArgs args = (SomeArgs) msg.obj;
                    try {
                        String callId = (String) args.arg1;
                        String participant = (String) args.arg2;
                        addParticipantWithConference(callId, participant);
                    } finally {
                        args.recycle();
                    }
                    break;
                }
                case MSG_MERGE_CONFERENCE:
                    mergeConference((String) msg.obj);
                    break;
@@ -839,6 +859,14 @@ public abstract class ConnectionService extends Service {
        }
    }

    private void addParticipantWithConference(String callId, String participant) {
        Log.d(this, "ConnectionService addParticipantWithConference(%s, %s)", participant, callId);
        Conference conference = findConferenceForAction(callId, "addParticipantWithConference");
        if (conference != null) {
            conference.onAddParticipant(participant);
        }
    }

    private void mergeConference(String callId) {
        Log.d(this, "mergeConference(%s)", callId);
        Conference conference = findConferenceForAction(callId, "mergeConference");
+2 −0
Original line number Diff line number Diff line
@@ -77,4 +77,6 @@ oneway interface IConnectionService {
    void setLocalCallHold(String callId, int lchState);

    void setActiveSubscription(String callId);

    void addParticipantWithConference(String callId, String receipants);
}