Transfer participants during 3 way conference
Anju Mathapati [Wed, 22 Jul 2015 20:55:57 +0000 (13:55 -0700)]
When active call fails to merge & only held call
merges into conference, pass the participants
from active to held call which is now going to
be the active conference call

Change-Id: I0f9ec11b92b48e8796daff8989f8af1f05548f37
Bug=23763005

src/java/com/android/ims/ImsCall.java

index e1d050a..a3fa7ef 100644 (file)
@@ -1847,6 +1847,16 @@ public class ImsCall implements ICall {
                     // brought up.
                     mMergePeer.mHold = false;
                     this.mHold = true;
+                    if (mConferenceParticipants != null && !mConferenceParticipants.isEmpty()) {
+                        mMergePeer.mConferenceParticipants = mConferenceParticipants;
+                    }
+                    // At this point both host & peer will have participant information.
+                    // Peer will transition to host & the participant information
+                    // from that will be used
+                    // HostCall that failed to merge will remain as a single call with
+                    // mConferenceParticipants, which should not be used.
+                    // Expectation is that if this call becomes part of a conference call in future,
+                    // mConferenceParticipants will be overriten with new CEP that is received.
                     finalHostCall = mMergePeer;
                     finalPeerCall = this;
                     swapRequired = true;
@@ -1923,7 +1933,8 @@ public class ImsCall implements ICall {
             }
             if (mConferenceParticipants != null && !mConferenceParticipants.isEmpty()) {
                 try {
-                    listener.onConferenceParticipantsStateChanged(this, mConferenceParticipants);
+                    listener.onConferenceParticipantsStateChanged(finalHostCall,
+                            mConferenceParticipants);
                 } catch (Throwable t) {
                     loge("processMergeComplete :: ", t);
                 }