Key the conference participants using the Endpoint
We currently keep track of the conference participants using the address
from the Conference Event Package. This can potentially be the same if
two or more of the participants include connections to the same
device. We will now use the endpoint as the unique identifier to be sure
that there are no possible duplicates.
Change-Id: Ice7d7b09cdb5fdcc844e1ab89cf255dffeca2b9e
Fixes: 30089057
diff --git a/src/com/android/services/telephony/ImsConference.java b/src/com/android/services/telephony/ImsConference.java
index fcee589..5a29e17 100644
--- a/src/com/android/services/telephony/ImsConference.java
+++ b/src/com/android/services/telephony/ImsConference.java
@@ -605,7 +605,7 @@
// Add any new participants and update existing.
for (ConferenceParticipant participant : participants) {
- Uri userEntity = participant.getHandle();
+ Uri userEntity = participant.getEndpoint();
participantUserEntities.add(userEntity);
if (!mConferenceParticipantConnections.containsKey(userEntity)) {
@@ -628,7 +628,7 @@
// Set the state of the new participants at once and add to the conference
for (ConferenceParticipant newParticipant : newParticipants) {
ConferenceParticipantConnection connection =
- mConferenceParticipantConnections.get(newParticipant.getHandle());
+ mConferenceParticipantConnections.get(newParticipant.getEndpoint());
connection.updateState(newParticipant.getState());
}
}
@@ -684,7 +684,7 @@
}
synchronized(mUpdateSyncRoot) {
- mConferenceParticipantConnections.put(participant.getHandle(), connection);
+ mConferenceParticipantConnections.put(participant.getEndpoint(), connection);
}
mTelephonyConnectionService.addExistingConnection(mConferenceHostPhoneAccountHandle,
connection);