Fix logic error in disconnectConferenceParticipants method in ImsConference.
- In disconnectConferenceParticipants, there is a call to
removeConferenceParticipant. This is problematic as the remove is called
in the middle of a for loop which loops through the
mConferenceParticipantConnections. It is also redundant as
disconnectConferenceParticipants calls mConferenceParticipantConnections.clear()
when it is done.
- There is also an orphaned "participant.getEndPoint()" call.
Change-Id: Ia43d2df699d3287856c1dcad7c7aae452db86c0d
diff --git a/src/com/android/services/telephony/ImsConference.java b/src/com/android/services/telephony/ImsConference.java
index e7a02ec..8fb101d 100644
--- a/src/com/android/services/telephony/ImsConference.java
+++ b/src/com/android/services/telephony/ImsConference.java
@@ -580,7 +580,6 @@
}
participant.removeConnectionListener(mParticipantListener);
- participant.getEndpoint();
mConferenceParticipantConnections.remove(participant.getEndpoint());
}
@@ -593,8 +592,7 @@
for (ConferenceParticipantConnection connection :
mConferenceParticipantConnections.values()) {
- removeConferenceParticipant(connection);
-
+ connection.removeConnectionListener(mParticipantListener);
// Mark disconnect cause as cancelled to ensure that the call is not logged in the
// call log.
connection.setDisconnected(new DisconnectCause(DisconnectCause.CANCELED));