diff options
Diffstat (limited to 'telecomm/java/android/telecom/Conference.java')
-rw-r--r-- | telecomm/java/android/telecom/Conference.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java index b7b98bf..215c682 100644 --- a/telecomm/java/android/telecom/Conference.java +++ b/telecomm/java/android/telecom/Conference.java @@ -183,6 +183,13 @@ public abstract class Conference { public void onAudioStateChanged(AudioState state) {} /** + * Notifies this conference that a connection has been added to it. + * + * @param connection The newly added connection. + */ + public void onConnectionAdded(Connection connection) {} + + /** * Sets state to be on hold. */ public final void setOnHold() { @@ -211,6 +218,13 @@ public abstract class Conference { } /** + * @return The {@link DisconnectCause} for this connection. + */ + public final DisconnectCause getDisconnectCause() { + return mDisconnectCause; + } + + /** * Sets the capabilities of a conference. See {@link PhoneCapabilities} for valid values. * * @param capabilities A bitmask of the {@code PhoneCapabilities} of the conference call. @@ -235,6 +249,7 @@ public abstract class Conference { if (connection != null && !mChildConnections.contains(connection)) { if (connection.setConference(this)) { mChildConnections.add(connection); + onConnectionAdded(connection); for (Listener l : mListeners) { l.onConnectionAdded(this, connection); } @@ -338,6 +353,19 @@ public abstract class Conference { } /** + * Retrieves the primary connection associated with the conference. The primary connection is + * the connection from which the conference will retrieve its current state. + * + * @return The primary connection. + */ + public Connection getPrimaryConnection() { + if (mUnmodifiableChildConnections == null || mUnmodifiableChildConnections.isEmpty()) { + return null; + } + return mUnmodifiableChildConnections.get(0); + } + + /** * Inform this Conference that the state of its audio output has been changed externally. * * @param state The new audio state. |