Lines Matching full:connection
24 import android.telecom.Connection.VideoProvider;
37 * Represents a conference call which can contain any number of {@link Connection} objects.
42 * Used to indicate that the conference connection time is not specified. If not specified,
51 public void onConnectionAdded(Conference conference, Connection connection) {}
52 public void onConnectionRemoved(Conference conference, Connection connection) {}
54 Conference conference, List<Connection> conferenceableConnections) {}
61 public void onVideoProviderChanged(Conference c, Connection.VideoProvider videoProvider) {}
68 private final List<Connection> mChildConnections = new CopyOnWriteArrayList<>();
69 private final List<Connection> mUnmodifiableChildConnections =
71 private final List<Connection> mConferenceableConnections = new ArrayList<>();
72 private final List<Connection> mUnmodifiableConferenceableConnections =
78 private int mState = Connection.STATE_NEW;
90 private final Connection.Listener mConnectionDeathListener = new Connection.Listener() {
92 public void onDestroyed(Connection c) {
140 * @return A list of {@code Connection} objects which represent the children of the conference.
142 public final List<Connection> getConnections() {
147 * Gets the state of the conference call. See {@link Connection} for valid values.
157 * {@link Connection} for valid values.
167 * {@link Connection} for valid values.
188 * Whether the capabilities of this {@code Connection} supports the specified capability.
261 * Notifies the {@link Conference} when the Conference and all it's {@link Connection}s should
267 * Notifies the {@link Conference} when the specified {@link Connection} should be separated
270 * @param connection The connection to separate.
272 public void onSeparate(Connection connection) {}
275 * Notifies the {@link Conference} when the specified {@link Connection} should merged with the
278 * @param connection The {@code Connection} to merge.
280 public void onMerge(Connection connection) {}
294 * conference contains the capability {@link Connection#CAPABILITY_MERGE_CONFERENCE}.
300 * conference contains the capability {@link Connection#CAPABILITY_SWAP_CONFERENCE}.
336 * Notifies the {@link Conference} that a {@link Connection} has been added to it.
338 * @param connection The newly added connection.
340 public void onConnectionAdded(Connection connection) {}
346 setState(Connection.STATE_HOLDING);
353 setState(Connection.STATE_DIALING);
360 setState(Connection.STATE_ACTIVE);
371 setState(Connection.STATE_DISCONNECTED);
378 * @return The {@link DisconnectCause} for this connection.
386 * {@link Connection} for valid values.
402 * {@link Connection} for valid values.
417 * Adds the specified connection as a child of this conference.
419 * @param connection The connection to add.
420 * @return True if the connection was successfully added.
422 public final boolean addConnection(Connection connection) {
423 Log.d(this, "Connection=%s, connection=", connection);
424 if (connection != null && !mChildConnections.contains(connection)) {
425 if (connection.setConference(this)) {
426 mChildConnections.add(connection);
427 onConnectionAdded(connection);
429 l.onConnectionAdded(this, connection);
438 * Removes the specified connection as a child of this conference.
440 * @param connection The connection to remove.
442 public final void removeConnection(Connection connection) {
443 Log.d(this, "removing %s from %s", connection, mChildConnections);
444 if (connection != null && mChildConnections.remove(connection)) {
445 connection.resetConference();
447 l.onConnectionRemoved(this, connection);
453 * Sets the connections with which this connection can be conferenced.
455 * @param conferenceableConnections The set of connections this connection can conference with.
457 public final void setConferenceableConnections(List<Connection> conferenceableConnections) {
459 for (Connection c : conferenceableConnections) {
479 public final void setVideoState(Connection c, int videoState) {
480 Log.d(this, "setVideoState Conference: %s Connection: %s VideoState: %s",
488 * Sets the video connection provider.
492 public final void setVideoProvider(Connection c, Connection.VideoProvider videoProvider) {
493 Log.d(this, "setVideoProvider Conference: %s Connection: %s VideoState: %s",
507 * Returns the connections with which this connection can be conferenced.
509 public final List<Connection> getConferenceableConnections() {
519 for (Connection connection : mChildConnections) {
520 Log.d(this, "removing connection %s", connection);
521 removeConnection(connection);
525 if (mState != Connection.STATE_DISCONNECTED) {
561 * Retrieves the primary connection associated with the conference. The primary connection is
562 * the connection from which the conference will retrieve its current state.
564 * @return The primary connection.
568 public Connection getPrimaryConnection() {
586 * Sets the connection start time of the {@code Conference}. This is used in the call log to
591 * When setting the connection time, you should always set the connection elapsed time via
594 * @param connectionTimeMillis The connection time, in milliseconds, as returned by
608 * When setting this, you should also set the connection time via
611 * @param connectionStartElapsedRealTime The connection time, as measured by
629 * Retrieves the connection start time of the {@code Conference}, if specified. A value of
640 * Retrieves the connection start time of the {@link Conference}, if specified. A value of
668 if (newState != Connection.STATE_ACTIVE &&
669 newState != Connection.STATE_HOLDING &&
670 newState != Connection.STATE_DISCONNECTED) {
672 Connection.stateToString(newState));
686 for (Connection c : mConferenceableConnections) {
696 Connection.stateToString(mState),
883 * @return The extras associated with this connection.