From 8a2b1199a6db0c6f2493e96e25ec1d89e3f62769 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Thu, 29 Jan 2015 11:47:24 -0800 Subject: [PATCH] Fixing conference merge where only one party is added to conference. - Adding "onConferenceStarted" listener for Connections. - This is necessary so that an ImsCall can report the fact that it has went from being a single party call to a multiparty call. This was not previously necessary since the multiparty bit change would be detected when one of the connections being merged changed state. Since we now must defer the establishment of the conference until all connections have been merged, we need a means of detecting when the call becomes multiparty. Bug: 18960042 Change-Id: I3ba138cb546e3efdf89b29d6676d00257a5e00cd --- api/system-current.txt | 1 + telecomm/java/android/telecom/Connection.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/api/system-current.txt b/api/system-current.txt index 56edc72cb79c8..d84b1dc979080 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -30037,6 +30037,7 @@ package android.telecom { method public final int getState(); method public final android.telecom.StatusHints getStatusHints(); method public final boolean isRingbackRequested(); + method protected void notifyConferenceStarted(); method public void onAbort(); method public void onAnswer(); method public void onAudioStateChanged(android.telecom.AudioState); diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index a180f447dc7e2..03fec0104d7c1 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -260,6 +260,7 @@ public abstract class Connection implements IConferenceable { /** @hide */ public void onConferenceParticipantsChanged(Connection c, List participants) {} + public void onConferenceStarted() {} } /** @hide */ @@ -1422,4 +1423,13 @@ public abstract class Connection implements IConferenceable { l.onConferenceParticipantsChanged(this, conferenceParticipants); } } + + /** + * Notifies listeners that a conference call has been started. + */ + protected void notifyConferenceStarted() { + for (Listener l : mListeners) { + l.onConferenceStarted(); + } + } }