diff options
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionService.java')
-rw-r--r-- | telecomm/java/android/telecom/ConnectionService.java | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index dfdc3e1..0c719cd 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -415,6 +415,21 @@ public abstract class ConnectionService extends Service { Connection.capabilitiesToString(connectionCapabilities)); mAdapter.setConnectionCapabilities(id, connectionCapabilities); } + + @Override + public void onVideoStateChanged(Conference c, int videoState) { + String id = mIdByConference.get(c); + Log.d(this, "onVideoStateChanged set video state %d", videoState); + mAdapter.setVideoState(id, videoState); + } + + @Override + public void onVideoProviderChanged(Conference c, Connection.VideoProvider videoProvider) { + String id = mIdByConference.get(c); + Log.d(this, "onVideoProviderChanged: Connection: %s, VideoProvider: %s", c, + videoProvider); + mAdapter.setVideoProvider(id, videoProvider); + } }; private final Connection.Listener mConnectionListener = new Connection.Listener() { @@ -508,6 +523,8 @@ public abstract class ConnectionService extends Service { @Override public void onVideoProviderChanged(Connection c, Connection.VideoProvider videoProvider) { String id = mIdByConnection.get(c); + Log.d(this, "onVideoProviderChanged: Connection: %s, VideoProvider: %s", c, + videoProvider); mAdapter.setVideoProvider(id, videoProvider); } @@ -542,6 +559,13 @@ public abstract class ConnectionService extends Service { mAdapter.setIsConferenced(id, conferenceId); } } + + @Override + public void onCallSubstateChanged(Connection c, int callSubstate) { + String id = mIdByConnection.get(c); + Log.d(this, "Adapter set call substate %d", callSubstate); + mAdapter.setCallSubstate(id, callSubstate); + } }; /** {@inheritDoc} */ @@ -611,7 +635,8 @@ public abstract class ConnectionService extends Service { connection.getAudioModeIsVoip(), connection.getStatusHints(), connection.getDisconnectCause(), - createIdList(connection.getConferenceables()))); + createIdList(connection.getConferenceables()), + connection.getCallSubstate())); } private void abort(String callId) { @@ -871,6 +896,8 @@ public abstract class ConnectionService extends Service { * @param conference The new conference object. */ public final void addConference(Conference conference) { + Log.d(this, "addConference: conference=%s", conference); + String id = addConferenceInternal(conference); if (id != null) { List<String> connectionIds = new ArrayList<>(2); @@ -884,8 +911,14 @@ public abstract class ConnectionService extends Service { conference.getState(), conference.getConnectionCapabilities(), connectionIds, - conference.getConnectTimeMillis()); + conference.getVideoProvider() == null ? + null : conference.getVideoProvider().getInterface(), + conference.getVideoState(), + conference.getConnectTimeMillis() + ); mAdapter.addConferenceCall(id, parcelableConference); + mAdapter.setVideoProvider(id, conference.getVideoProvider()); + mAdapter.setVideoState(id, conference.getVideoState()); // Go through any child calls and set the parent. for (Connection connection : conference.getConnections()) { @@ -926,7 +959,7 @@ public abstract class ConnectionService extends Service { connection.getAudioModeIsVoip(), connection.getStatusHints(), connection.getDisconnectCause(), - emptyList); + emptyList, connection.getCallSubstate()); mAdapter.addExistingConnection(id, parcelableConnection); } } |