Merge "Add ability to add existing connection AND set parent at the same time." into oc-dev
am: 95f4f14e0b
Change-Id: If762616920b266064cd1ee5520d5778ebb1475a7
This commit is contained in:
@@ -1824,10 +1824,28 @@ public abstract class ConnectionService extends Service {
|
||||
*/
|
||||
public final void addExistingConnection(PhoneAccountHandle phoneAccountHandle,
|
||||
Connection connection) {
|
||||
addExistingConnection(phoneAccountHandle, connection, null /* conference */);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a connection created by the {@link ConnectionService} and informs telecom of the new
|
||||
* connection.
|
||||
*
|
||||
* @param phoneAccountHandle The phone account handle for the connection.
|
||||
* @param connection The connection to add.
|
||||
* @param conference The parent conference of the new connection.
|
||||
* @hide
|
||||
*/
|
||||
public final void addExistingConnection(PhoneAccountHandle phoneAccountHandle,
|
||||
Connection connection, Conference conference) {
|
||||
|
||||
String id = addExistingConnectionInternal(phoneAccountHandle, connection);
|
||||
if (id != null) {
|
||||
List<String> emptyList = new ArrayList<>(0);
|
||||
String conferenceId = null;
|
||||
if (conference != null) {
|
||||
conferenceId = mIdByConference.get(conference);
|
||||
}
|
||||
|
||||
ParcelableConnection parcelableConnection = new ParcelableConnection(
|
||||
phoneAccountHandle,
|
||||
@@ -1848,7 +1866,8 @@ public abstract class ConnectionService extends Service {
|
||||
connection.getStatusHints(),
|
||||
connection.getDisconnectCause(),
|
||||
emptyList,
|
||||
connection.getExtras());
|
||||
connection.getExtras(),
|
||||
conferenceId);
|
||||
mAdapter.addExistingConnection(id, parcelableConnection);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user