Creating connections for conference event package participants.
- Add "addExistingConnection" method to connection service which provides
a way for a connection service to notify telecom of a pre-existing
connection (connections are normally created through telecom).
- Modify TelephonyConferenceController to retrieve its state from a
multiparty connection in the conference (in the case of IMS calls, this
would be the ImsCall that manages the conference) instead of just taking
the first one.
Bug: 18057361
Change-Id: I26993aec54ecb0ce90ae6983fd3eed9d8d0a5773
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java
index 15cb786..003d5cd 100644
--- a/telecomm/java/android/telecom/Conference.java
+++ b/telecomm/java/android/telecom/Conference.java
@@ -334,6 +334,19 @@
}
/**
+ * 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.