Refine implementation of GSM conferences (1/3)

Bug: 17684223
Change-Id: I05d05b594803ea2c1da4247111b70ad5f870ac46
This commit is contained in:
Ihab Awad
2014-09-30 09:17:03 -07:00
parent 9cf01b63cb
commit 50e3506533
5 changed files with 114 additions and 11 deletions

View File

@@ -278,8 +278,13 @@ final class RemoteConnectionService {
}
}
findConnectionForAction(callId, "setConferenceableConnections")
.setConferenceableConnections(conferenceable);
if (hasConnection(callId)) {
findConnectionForAction(callId, "setConferenceableConnections")
.setConferenceableConnections(conferenceable);
} else {
findConferenceForAction(callId, "setConferenceableConnections")
.setConferenceableConnections(conferenceable);
}
}
};
@@ -358,6 +363,10 @@ final class RemoteConnectionService {
}
}
private boolean hasConnection(String callId) {
return mConferenceById.containsKey(callId);
}
private RemoteConnection findConnectionForAction(
String callId, String action) {
if (mConnectionById.containsKey(callId)) {