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

Commit ad0554e7 authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

Merge "Support disconnecting conference participants from conference." into lmp-mr1-dev

parents 2132a7b8 d7f4ed8a
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


package com.android.internal.telephony;
package com.android.internal.telephony;


import android.net.Uri;
import android.os.SystemClock;
import android.os.SystemClock;
import android.telecom.ConferenceParticipant;
import android.telecom.ConferenceParticipant;
import android.telephony.Rlog;
import android.telephony.Rlog;
@@ -557,6 +558,15 @@ public abstract class Connection {
        }
        }
    }
    }


    /**
     * Notifies this Connection of a request to disconnect a participant of the conference managed
     * by the connection.
     *
     * @param endpoint the {@link Uri} of the participant to disconnect.
     */
    public void onDisconnectConferenceParticipant(Uri endpoint) {
    }

    /**
    /**
     * Build a human representation of a connection instance, suitable for debugging.
     * Build a human representation of a connection instance, suitable for debugging.
     * Don't log personal stuff unless in debug mode.
     * Don't log personal stuff unless in debug mode.
+22 −0
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.internal.telephony.imsphone;
package com.android.internal.telephony.imsphone;


import android.content.Context;
import android.content.Context;
import android.net.Uri;
import android.os.AsyncResult;
import android.os.AsyncResult;
import android.os.Handler;
import android.os.Handler;
import android.os.Looper;
import android.os.Looper;
@@ -662,5 +663,26 @@ public class ImsPhoneConnection extends Connection {
    public int getPreciseDisconnectCause() {
    public int getPreciseDisconnectCause() {
        return 0;
        return 0;
    }
    }

    /**
     * Notifies this Connection of a request to disconnect a participant of the conference managed
     * by the connection.
     *
     * @param endpoint the {@link android.net.Uri} of the participant to disconnect.
     */
    @Override
    public void onDisconnectConferenceParticipant(Uri endpoint) {
        ImsCall imsCall = getImsCall();
        if (imsCall == null) {
            return;
        }
        try {
            imsCall.removeParticipants(new String[]{endpoint.toString()});
        } catch (ImsException e) {
            // No session in place -- no change
            Rlog.e(LOG_TAG, "onDisconnectConferenceParticipant: no session in place. "+
                    "Failed to disconnect endpoint = " + endpoint);
        }
    }
}
}