summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ConnectionService.java
diff options
context:
space:
mode:
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionService.java')
-rwxr-xr-xtelecomm/java/android/telecom/ConnectionService.java85
1 files changed, 49 insertions, 36 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index ffd25c08a8ba..1b60e4820ad0 100755
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -1554,6 +1554,14 @@ public abstract class ConnectionService extends Service {
}
@Override
+ public void onCallDirectionChanged(Conference c, int direction) {
+ String id = mIdByConference.get(c);
+ if (id != null) {
+ mAdapter.setCallDirection(id, direction);
+ }
+ }
+
+ @Override
public void onAddressChanged(Conference c, Uri newAddress, int presentation) {
String id = mIdByConference.get(c);
if (id != null) {
@@ -1857,25 +1865,23 @@ public abstract class ConnectionService extends Service {
mConferenceById.put(callId, conference);
mIdByConference.put(conference, callId);
conference.addListener(mConferenceListener);
- ParcelableConference parcelableConference = new ParcelableConference(
- request.getAccountHandle(),
- conference.getState(),
- conference.getConnectionCapabilities(),
- conference.getConnectionProperties(),
- Collections.<String>emptyList(), //connectionIds
- conference.getVideoProvider() == null ?
- null : conference.getVideoProvider().getInterface(),
- conference.getVideoState(),
- conference.getConnectTimeMillis(),
- conference.getConnectionStartElapsedRealtimeMillis(),
- conference.getStatusHints(),
- conference.getExtras(),
- conference.getAddress(),
- conference.getAddressPresentation(),
- conference.getCallerDisplayName(),
- conference.getCallerDisplayNamePresentation(),
- conference.getDisconnectCause(),
- conference.isRingbackRequested());
+ ParcelableConference parcelableConference = new ParcelableConference.Builder(
+ request.getAccountHandle(), conference.getState())
+ .setConnectionCapabilities(conference.getConnectionCapabilities())
+ .setConnectionProperties(conference.getConnectionProperties())
+ .setVideoAttributes(conference.getVideoProvider() == null
+ ? null : conference.getVideoProvider().getInterface(),
+ conference.getVideoState())
+ .setConnectTimeMillis(conference.getConnectTimeMillis(),
+ conference.getConnectionStartElapsedRealtimeMillis())
+ .setStatusHints(conference.getStatusHints())
+ .setExtras(conference.getExtras())
+ .setAddress(conference.getAddress(), conference.getAddressPresentation())
+ .setCallerDisplayName(conference.getCallerDisplayName(),
+ conference.getCallerDisplayNamePresentation())
+ .setDisconnectCause(conference.getDisconnectCause())
+ .setRingbackRequested(conference.isRingbackRequested())
+ .build();
if (conference.getState() != Connection.STATE_DISCONNECTED) {
conference.setTelecomCallId(callId);
mAdapter.setVideoProvider(callId, conference.getVideoProvider());
@@ -2476,27 +2482,34 @@ public abstract class ConnectionService extends Service {
}
}
conference.setTelecomCallId(id);
- ParcelableConference parcelableConference = new ParcelableConference(
- conference.getPhoneAccountHandle(),
- conference.getState(),
- conference.getConnectionCapabilities(),
- conference.getConnectionProperties(),
- connectionIds,
- conference.getVideoProvider() == null ?
- null : conference.getVideoProvider().getInterface(),
- conference.getVideoState(),
- conference.getConnectTimeMillis(),
- conference.getConnectionStartElapsedRealtimeMillis(),
- conference.getStatusHints(),
- conference.getExtras(),
- conference.getAddress(),
- conference.getAddressPresentation(),
- conference.getCallerDisplayName(),
- conference.getCallerDisplayNamePresentation());
+ ParcelableConference parcelableConference = new ParcelableConference.Builder(
+ conference.getPhoneAccountHandle(), conference.getState())
+ .setConnectionCapabilities(conference.getConnectionCapabilities())
+ .setConnectionProperties(conference.getConnectionProperties())
+ .setConnectionIds(connectionIds)
+ .setVideoAttributes(conference.getVideoProvider() == null
+ ? null : conference.getVideoProvider().getInterface(),
+ conference.getVideoState())
+ .setConnectTimeMillis(conference.getConnectTimeMillis(),
+ conference.getConnectionStartElapsedRealtimeMillis())
+ .setStatusHints(conference.getStatusHints())
+ .setExtras(conference.getExtras())
+ .setAddress(conference.getAddress(), conference.getAddressPresentation())
+ .setCallerDisplayName(conference.getCallerDisplayName(),
+ conference.getCallerDisplayNamePresentation())
+ .setDisconnectCause(conference.getDisconnectCause())
+ .setRingbackRequested(conference.isRingbackRequested())
+ .setCallDirection(conference.getCallDirection())
+ .build();
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()) {