aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-09 07:03:50 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-09 07:03:50 +0000
commitd9c00379ec25213e4e6072463b38d59baa0330cc (patch)
treec28c5989ea4cc6c9e311b8441d8e08871c2bc039
parent811a7f7512a330a51cad2f339f7bd40eee13e695 (diff)
parent4b820677884014b555f2af0352b0fb31ac673949 (diff)
downloadims-d9c00379ec25213e4e6072463b38d59baa0330cc.tar.gz
Snap for 6379507 from 4b820677884014b555f2af0352b0fb31ac673949 to mainline-release
Change-Id: If254b58862d949238e4466401e7e8d1cf635d5d6
-rwxr-xr-xsrc/java/com/android/ims/ImsCall.java32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/java/com/android/ims/ImsCall.java b/src/java/com/android/ims/ImsCall.java
index f61e734b..04b1e9cc 100755
--- a/src/java/com/android/ims/ImsCall.java
+++ b/src/java/com/android/ims/ImsCall.java
@@ -43,8 +43,10 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.telephony.Rlog;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Set;
@@ -1915,14 +1917,26 @@ public class ImsCall implements ICall {
return;
}
+ mConferenceParticipants = parseConferenceState(state);
+
+ if (mConferenceParticipants != null && mListener != null) {
+ try {
+ mListener.onConferenceParticipantsStateChanged(this, mConferenceParticipants);
+ } catch (Throwable t) {
+ loge("notifyConferenceStateUpdated :: ", t);
+ }
+ }
+ }
+
+ public static List<ConferenceParticipant> parseConferenceState(ImsConferenceState state) {
Set<Entry<String, Bundle>> participants = state.mParticipants.entrySet();
if (participants == null) {
- return;
+ return Collections.emptyList();
}
Iterator<Entry<String, Bundle>> iterator = participants.iterator();
- mConferenceParticipants = new ArrayList<>(participants.size());
+ List<ConferenceParticipant> conferenceParticipants = new ArrayList<>(participants.size());
while (iterator.hasNext()) {
Entry<String, Bundle> entry = iterator.next();
@@ -1934,7 +1948,7 @@ public class ImsCall implements ICall {
String endpoint = confInfo.getString(ImsConferenceState.ENDPOINT);
if (CONF_DBG) {
- logi("notifyConferenceStateUpdated :: key=" + Rlog.pii(TAG, key) +
+ Log.i(TAG, "notifyConferenceStateUpdated :: key=" + Rlog.pii(TAG, key) +
", status=" + status +
", user=" + Rlog.pii(TAG, user) +
", displayName= " + Rlog.pii(TAG, displayName) +
@@ -1951,17 +1965,10 @@ public class ImsCall implements ICall {
if (connectionState != Connection.STATE_DISCONNECTED) {
ConferenceParticipant conferenceParticipant = new ConferenceParticipant(handle,
displayName, endpointUri, connectionState, Call.Details.DIRECTION_UNKNOWN);
- mConferenceParticipants.add(conferenceParticipant);
- }
- }
-
- if (mConferenceParticipants != null && mListener != null) {
- try {
- mListener.onConferenceParticipantsStateChanged(this, mConferenceParticipants);
- } catch (Throwable t) {
- loge("notifyConferenceStateUpdated :: ", t);
+ conferenceParticipants.add(conferenceParticipant);
}
}
+ return conferenceParticipants;
}
/**
@@ -3067,7 +3074,6 @@ public class ImsCall implements ICall {
public void callSessionConferenceStateUpdated(ImsCallSession session,
ImsConferenceState state) {
logi("callSessionConferenceStateUpdated :: state=" + state);
-
conferenceStateUpdated(state);
}