summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ConnectionService.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2020-04-08 13:12:30 -0700
committerTyler Gunn <tgunn@google.com>2020-05-11 14:29:44 -0700
commit1036237bb5861ddeeda0617eae34148f192869d1 (patch)
tree22ebe5a343f330d788fc7f59124bc48cbfcc34be /telecomm/java/android/telecom/ConnectionService.java
parent1926b83e8523fdb02404093db155074ee230bd3f (diff)
Ensure conference state is posted to Telecom for new conferences.
There is an edge-case where an IMS conference fails to merge two participants into a conference, AND the conference event package comes in before the ImsCall indicates it is multiparty. In this case, the CEP will have a single participant which means we'll treat the call as a standalone call. ImsConference correctly sets the conference state, but this was previously just passed along the ConnectionService adapter to Telecom. In this case the conference isn't even added to Telecom so the method call in effect does nothing. Changed to cache the conference state and ensure when adding the conference to Telecom that we call the setConferenceState method (yeah, could have put this in the ParcelableConference, but this is an edge case). Test: Wrote unit test to verify property is set. Bug: 134047008 Fixes: 155097934 Merged-In: I203880c593f6bac471a06eb9dcbb529d0bb75ba5 Change-Id: Ib48437abb1295d147e227727ce4ff2996f28b5de
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionService.java')
-rwxr-xr-xtelecomm/java/android/telecom/ConnectionService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 73296986d82e..1b60e4820ad0 100755
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -2505,6 +2505,11 @@ public abstract class ConnectionService extends Service {
mAdapter.addConferenceCall(id, parcelableConference);
mAdapter.setVideoProvider(id, conference.getVideoProvider());
mAdapter.setVideoState(id, conference.getVideoState());
+ // In some instances a conference can start its life as a standalone call with just a
+ // single participant; ensure we signal to Telecom in this case.
+ if (!conference.isMultiparty()) {
+ mAdapter.setConferenceState(id, conference.isMultiparty());
+ }
// Go through any child calls and set the parent.
for (Connection connection : conference.getConnections()) {