Lines Matching refs:Conference
82 private final Map<String, Conference> mConferenceById = new ConcurrentHashMap<>();
83 private final Map<Conference, String> mIdByConference = new ConcurrentHashMap<>();
90 private Conference sNullConference;
176 public void conference(String callId1, String callId2) {
304 conference(callId1, callId2);
336 private final Conference.Listener mConferenceListener = new Conference.Listener() {
338 public void onStateChanged(Conference conference, int oldState, int newState) {
339 String id = mIdByConference.get(conference);
354 public void onDisconnected(Conference conference, DisconnectCause disconnectCause) {
355 String id = mIdByConference.get(conference);
360 public void onConnectionAdded(Conference conference, Connection connection) {
364 public void onConnectionRemoved(Conference conference, Connection connection) {
369 Conference conference, List<Connection> conferenceableConnections) {
371 mIdByConference.get(conference),
376 public void onDestroyed(Conference conference) {
377 removeConference(conference);
381 public void onCapabilitiesChanged(Conference conference, int capabilities) {
382 String id = mIdByConference.get(conference);
383 Log.d(this, "call capabilities: conference: %s",
497 public void onConferenceChanged(Connection connection, Conference conference) {
501 if (conference != null) {
502 conferenceId = mIdByConference.get(conference);
653 private void conference(String callId1, String callId2) {
654 Log.d(this, "conference %s, %s", callId1, callId2);
656 Connection connection2 = findConnectionForAction(callId2, "conference");
658 Log.w(this, "Connection2 missing in conference request %s.", callId2);
662 Connection connection1 = findConnectionForAction(callId1, "conference");
664 Conference conference1 = findConferenceForAction(callId1, "addConnection");
667 "Connection1 or Conference1 missing in conference request %s.",
682 Log.w(this, "Connection missing in conference request %s.", callId);
686 Conference conference = connection.getConference();
687 if (conference != null) {
688 conference.onSeparate(connection);
694 Conference conference = findConferenceForAction(callId, "mergeConference");
695 if (conference != null) {
696 conference.onMerge();
702 Conference conference = findConferenceForAction(callId, "swapConference");
703 if (conference != null) {
704 conference.onSwap();
794 * Adds a new conference call. When a conference call is created either as a result of an
796 * an instance of {@link Conference} by invoking this method. A conference call provided by this
797 * method will persist until {@link Conference#destroy} is invoked on the conference instance.
799 * @param conference The new conference object.
801 public final void addConference(Conference conference) {
802 String id = addConferenceInternal(conference);
805 for (Connection connection : conference.getConnections()) {
811 conference.getPhoneAccountHandle(),
812 conference.getState(),
813 conference.getCapabilities(),
818 for (Connection connection : conference.getConnections()) {
900 * Conference two specified connections. Invoked when the user has made a request to merge the
901 * specified connections into a conference call. In response, the connection service should
902 * create an instance of {@link Conference} and pass it into {@link #addConference}.
904 * @param connection1 A connection to merge into a conference call.
905 * @param connection2 A connection to merge into a conference call.
909 public void onRemoteConferenceAdded(RemoteConference conference) {}
914 public boolean containsConference(Conference conference) {
915 return mIdByConference.containsKey(conference);
947 private String addConferenceInternal(Conference conference) {
948 if (mIdByConference.containsKey(conference)) {
949 Log.w(this, "Re-adding an existing conference: %s.", conference);
950 } else if (conference != null) {
952 mConferenceById.put(id, conference);
953 mIdByConference.put(conference, id);
954 conference.addListener(mConferenceListener);
961 private void removeConference(Conference conference) {
962 if (mIdByConference.containsKey(conference)) {
963 conference.removeListener(mConferenceListener);
965 String id = mIdByConference.get(conference);
967 mIdByConference.remove(conference);
987 private Conference findConferenceForAction(String conferenceId, String action) {
991 Log.w(this, "%s - Cannot find conference %s", action, conferenceId);
1006 private Conference getNullConference() {
1008 sNullConference = new Conference(null) {};
1016 // only operate on top-level calls. Conference calls will be removed on their own.
1021 for (Conference conference : mIdByConference.keySet()) {
1022 conference.onDisconnect();