Transfer participants during 3 way conference

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
diff --git a/src/java/com/android/ims/ImsCall.java b/src/java/com/android/ims/ImsCall.java
index e1d050a..a3fa7ef 100644
--- a/src/java/com/android/ims/ImsCall.java
+++ b/src/java/com/android/ims/ImsCall.java
@@ -1847,6 +1847,16 @@
                     // 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 @@
             }
             if (mConferenceParticipants != null && !mConferenceParticipants.isEmpty()) {
                 try {
-                    listener.onConferenceParticipantsStateChanged(this, mConferenceParticipants);
+                    listener.onConferenceParticipantsStateChanged(finalHostCall,
+                            mConferenceParticipants);
                 } catch (Throwable t) {
                     loge("processMergeComplete :: ", t);
                 }