summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ConnectionService.java
diff options
context:
space:
mode:
authorBrad Ebinger <breadley@google.com>2020-04-09 15:30:57 -0700
committerBrad Ebinger <breadley@google.com>2020-04-20 12:19:34 -0700
commit0ae44ed738e119ae44a4911e9947d44c36e6b391 (patch)
tree1ecccdda62613635ae7bd10be87c171b2bc78711 /telecomm/java/android/telecom/ConnectionService.java
parent28b71ac4158603b9be3a0d6bbf5739ff71a3646b (diff)
Add a new call direction parameter to conferences for multiparty
1) Refactor ParcelableConference - too many optional params 2) Add a new call direction parameter for external multiparty call scenarios, where a conference is assigned a direction. Bug: 153595501 Fixes: 154246448 Test: atest TelecomUnitTests TeleServiceTests Merged-In: Icb576a07b9a7a81e228babfea53474be83da7593 Change-Id: Icb576a07b9a7a81e228babfea53474be83da7593
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionService.java')
-rwxr-xr-xtelecomm/java/android/telecom/ConnectionService.java72
1 files changed, 36 insertions, 36 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 0dca006f37c0..01ff12ef10a5 100755
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -1857,25 +1857,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,23 +2474,25 @@ 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());