Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 1 | /* |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 2 | * Copyright (C) 2014 The Android Open Source Project |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.telecomm; |
| 18 | |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 19 | import android.content.ComponentName; |
| 20 | import android.os.IBinder; |
| 21 | import android.os.IBinder.DeathRecipient; |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 22 | import android.os.RemoteException; |
| 23 | |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 24 | import com.android.internal.telecomm.ICallService; |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 25 | import com.android.internal.telecomm.ICallServiceAdapter; |
Andrew Lee | 5ffbe8b | 2014-06-20 16:29:33 -0700 | [diff] [blame^] | 26 | import com.android.internal.telecomm.ICallVideoProvider; |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 27 | import com.android.internal.telecomm.RemoteServiceCallback; |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 28 | |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 29 | import java.util.ArrayList; |
| 30 | import java.util.HashSet; |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 31 | import java.util.List; |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 32 | import java.util.Set; |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 33 | |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 34 | /** |
| 35 | * Provides methods for ICallService implementations to interact with the system phone app. |
| 36 | * TODO(santoscordon): Need final public-facing comments in this file. |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 37 | * TODO(santoscordon): Rename this to CallServiceAdapterDemultiplexer (or something). |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 38 | */ |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 39 | public final class CallServiceAdapter implements DeathRecipient { |
| 40 | private final Set<ICallServiceAdapter> mAdapters = new HashSet<>(); |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 41 | |
| 42 | /** |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 43 | * @hide |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 44 | */ |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 45 | public CallServiceAdapter() { |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * @hide |
| 50 | */ |
| 51 | public void addAdapter(ICallServiceAdapter adapter) { |
| 52 | if (mAdapters.add(adapter)) { |
| 53 | try { |
| 54 | adapter.asBinder().linkToDeath(this, 0); |
| 55 | } catch (RemoteException e) { |
| 56 | mAdapters.remove(adapter); |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * @hide |
| 63 | */ |
| 64 | public void removeAdapter(ICallServiceAdapter adapter) { |
| 65 | if (mAdapters.remove(adapter)) { |
| 66 | adapter.asBinder().unlinkToDeath(this, 0); |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /** ${inheritDoc} */ |
| 71 | @Override |
| 72 | public void binderDied() { |
| 73 | ICallServiceAdapter adapterToRemove = null; |
| 74 | for (ICallServiceAdapter adapter : mAdapters) { |
| 75 | if (!adapter.asBinder().isBinderAlive()) { |
| 76 | adapterToRemove = adapter; |
| 77 | break; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | if (adapterToRemove != null) { |
| 82 | removeAdapter(adapterToRemove); |
| 83 | } |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 84 | } |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 85 | |
| 86 | /** |
Santos Cordon | b340c33 | 2014-02-19 01:59:32 -0800 | [diff] [blame] | 87 | * Provides Telecomm with the details of an incoming call. An invocation of this method must |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 88 | * follow {@link CallService#setIncomingCallId} and use the call ID specified therein. Upon the |
| 89 | * invocation of this method, Telecomm will bring up the incoming-call interface where the user |
| 90 | * can elect to answer or reject a call. |
Santos Cordon | 3784133 | 2013-12-17 13:30:53 -0800 | [diff] [blame] | 91 | * |
Santos Cordon | 805afaa | 2014-01-29 11:58:36 -0800 | [diff] [blame] | 92 | * @param callInfo The details of the relevant call. |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 93 | */ |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 94 | public void notifyIncomingCall(CallInfo callInfo) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 95 | for (ICallServiceAdapter adapter : mAdapters) { |
| 96 | try { |
| 97 | adapter.notifyIncomingCall(callInfo); |
| 98 | } catch (RemoteException e) { |
| 99 | } |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 100 | } |
| 101 | } |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 102 | |
| 103 | /** |
Santos Cordon | f6d868b | 2014-02-05 13:04:15 -0800 | [diff] [blame] | 104 | * Tells Telecomm that an attempt to place the specified outgoing call succeeded. |
| 105 | * TODO(santoscordon): Consider adding a CallState parameter in case this outgoing call is |
| 106 | * somehow no longer in the DIALING state. |
Santos Cordon | 3784133 | 2013-12-17 13:30:53 -0800 | [diff] [blame] | 107 | * |
Santos Cordon | f6d868b | 2014-02-05 13:04:15 -0800 | [diff] [blame] | 108 | * @param callId The ID of the outgoing call. |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 109 | */ |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 110 | public void handleSuccessfulOutgoingCall(String callId) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 111 | for (ICallServiceAdapter adapter : mAdapters) { |
| 112 | try { |
| 113 | adapter.handleSuccessfulOutgoingCall(callId); |
| 114 | } catch (RemoteException e) { |
| 115 | } |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 116 | } |
| 117 | } |
Santos Cordon | f6d868b | 2014-02-05 13:04:15 -0800 | [diff] [blame] | 118 | |
| 119 | /** |
| 120 | * Tells Telecomm that an attempt to place the specified outgoing call failed. |
| 121 | * |
Ihab Awad | fc91b7d | 2014-06-03 18:40:45 -0700 | [diff] [blame] | 122 | * @param request The originating request for a connection. |
| 123 | * @param errorCode The error code associated with the failed call attempt. |
| 124 | * @param errorMsg The error message associated with the failed call attempt. |
Santos Cordon | f6d868b | 2014-02-05 13:04:15 -0800 | [diff] [blame] | 125 | */ |
Ihab Awad | fc91b7d | 2014-06-03 18:40:45 -0700 | [diff] [blame] | 126 | public void handleFailedOutgoingCall( |
| 127 | ConnectionRequest request, |
| 128 | int errorCode, |
| 129 | String errorMsg) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 130 | for (ICallServiceAdapter adapter : mAdapters) { |
| 131 | try { |
| 132 | adapter.handleFailedOutgoingCall(request, errorCode, errorMsg); |
| 133 | } catch (RemoteException e) { |
| 134 | } |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 135 | } |
| 136 | } |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 137 | |
| 138 | /** |
Sailesh Nepal | 506e386 | 2014-06-25 13:35:14 -0700 | [diff] [blame] | 139 | * Tells Telecomm to cancel the call. |
| 140 | * |
| 141 | * @param callId The ID of the outgoing call. |
| 142 | */ |
| 143 | public void cancelOutgoingCall(String callId) { |
| 144 | for (ICallServiceAdapter adapter : mAdapters) { |
| 145 | try { |
| 146 | adapter.cancelOutgoingCall(callId); |
| 147 | } catch (RemoteException e) { |
| 148 | } |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | /** |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 153 | * Sets a call's state to active (e.g., an ongoing call where two parties can actively |
| 154 | * communicate). |
Santos Cordon | 3784133 | 2013-12-17 13:30:53 -0800 | [diff] [blame] | 155 | * |
| 156 | * @param callId The unique ID of the call whose state is changing to active. |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 157 | */ |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 158 | public void setActive(String callId) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 159 | for (ICallServiceAdapter adapter : mAdapters) { |
| 160 | try { |
| 161 | adapter.setActive(callId); |
| 162 | } catch (RemoteException e) { |
| 163 | } |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 164 | } |
| 165 | } |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 166 | |
| 167 | /** |
| 168 | * Sets a call's state to ringing (e.g., an inbound ringing call). |
Santos Cordon | 3784133 | 2013-12-17 13:30:53 -0800 | [diff] [blame] | 169 | * |
| 170 | * @param callId The unique ID of the call whose state is changing to ringing. |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 171 | */ |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 172 | public void setRinging(String callId) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 173 | for (ICallServiceAdapter adapter : mAdapters) { |
| 174 | try { |
| 175 | adapter.setRinging(callId); |
| 176 | } catch (RemoteException e) { |
| 177 | } |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 178 | } |
| 179 | } |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 180 | |
| 181 | /** |
| 182 | * Sets a call's state to dialing (e.g., dialing an outbound call). |
Santos Cordon | 3784133 | 2013-12-17 13:30:53 -0800 | [diff] [blame] | 183 | * |
| 184 | * @param callId The unique ID of the call whose state is changing to dialing. |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 185 | */ |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 186 | public void setDialing(String callId) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 187 | for (ICallServiceAdapter adapter : mAdapters) { |
| 188 | try { |
| 189 | adapter.setDialing(callId); |
| 190 | } catch (RemoteException e) { |
| 191 | } |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 192 | } |
| 193 | } |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 194 | |
| 195 | /** |
| 196 | * Sets a call's state to disconnected. |
Santos Cordon | 3784133 | 2013-12-17 13:30:53 -0800 | [diff] [blame] | 197 | * |
| 198 | * @param callId The unique ID of the call whose state is changing to disconnected. |
Santos Cordon | 20e3f02 | 2014-03-27 12:15:38 -0700 | [diff] [blame] | 199 | * @param disconnectCause The reason for the disconnection, any of |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 200 | * {@link android.telephony.DisconnectCause}. |
Santos Cordon | 20e3f02 | 2014-03-27 12:15:38 -0700 | [diff] [blame] | 201 | * @param disconnectMessage Optional call-service-provided message about the disconnect. |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 202 | */ |
Santos Cordon | 20e3f02 | 2014-03-27 12:15:38 -0700 | [diff] [blame] | 203 | public void setDisconnected(String callId, int disconnectCause, String disconnectMessage) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 204 | for (ICallServiceAdapter adapter : mAdapters) { |
| 205 | try { |
| 206 | adapter.setDisconnected(callId, disconnectCause, disconnectMessage); |
| 207 | } catch (RemoteException e) { |
| 208 | } |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 209 | } |
| 210 | } |
Yorke Lee | 81ccaaa | 2014-03-12 18:33:19 -0700 | [diff] [blame] | 211 | |
| 212 | /** |
| 213 | * Sets a call's state to be on hold. |
| 214 | * |
| 215 | * @param callId - The unique ID of the call whose state is changing to be on hold. |
| 216 | */ |
| 217 | public void setOnHold(String callId) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 218 | for (ICallServiceAdapter adapter : mAdapters) { |
| 219 | try { |
| 220 | adapter.setOnHold(callId); |
| 221 | } catch (RemoteException e) { |
| 222 | } |
Yorke Lee | 81ccaaa | 2014-03-12 18:33:19 -0700 | [diff] [blame] | 223 | } |
| 224 | } |
| 225 | |
Ihab Awad | f835897 | 2014-05-28 16:46:42 -0700 | [diff] [blame] | 226 | /** |
| 227 | * Asks Telecomm to start or stop a ringback tone for a call. |
| 228 | * |
| 229 | * @param callId The unique ID of the call whose ringback is being changed. |
| 230 | * @param ringback Whether Telecomm should start playing a ringback tone. |
| 231 | */ |
| 232 | public void setRequestingRingback(String callId, boolean ringback) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 233 | for (ICallServiceAdapter adapter : mAdapters) { |
| 234 | try { |
| 235 | adapter.setRequestingRingback(callId, ringback); |
| 236 | } catch (RemoteException e) { |
| 237 | } |
Ihab Awad | f835897 | 2014-05-28 16:46:42 -0700 | [diff] [blame] | 238 | } |
| 239 | } |
Yorke Lee | 81ccaaa | 2014-03-12 18:33:19 -0700 | [diff] [blame] | 240 | |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 241 | /** |
| 242 | * Indicates that the specified call can conference with any of the specified list of calls. |
| 243 | * |
| 244 | * @param callId The unique ID of the call. |
Santos Cordon | b693998 | 2014-06-04 20:20:58 -0700 | [diff] [blame] | 245 | * @param canConference Specified whether or not the call can be conferenced. |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 246 | * @hide |
| 247 | */ |
Santos Cordon | b693998 | 2014-06-04 20:20:58 -0700 | [diff] [blame] | 248 | public void setCanConference(String callId, boolean canConference) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 249 | for (ICallServiceAdapter adapter : mAdapters) { |
| 250 | try { |
| 251 | adapter.setCanConference(callId, canConference); |
| 252 | } catch (RemoteException ignored) { |
| 253 | } |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 254 | } |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * Indicates whether or not the specified call is currently conferenced into the specified |
| 259 | * conference call. |
| 260 | * |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 261 | * @param callId The unique ID of the call being conferenced. |
Santos Cordon | b693998 | 2014-06-04 20:20:58 -0700 | [diff] [blame] | 262 | * @param conferenceCallId The unique ID of the conference call. Null if call is not |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 263 | * conferenced. |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 264 | * @hide |
| 265 | */ |
Santos Cordon | b693998 | 2014-06-04 20:20:58 -0700 | [diff] [blame] | 266 | public void setIsConferenced(String callId, String conferenceCallId) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 267 | for (ICallServiceAdapter adapter : mAdapters) { |
| 268 | try { |
| 269 | adapter.setIsConferenced(callId, conferenceCallId); |
| 270 | } catch (RemoteException ignored) { |
| 271 | } |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 272 | } |
| 273 | } |
| 274 | |
| 275 | /** |
| 276 | * Indicates that the call no longer exists. Can be used with either a call or a conference |
| 277 | * call. |
| 278 | * |
| 279 | * @param callId The unique ID of the call. |
| 280 | * @hide |
| 281 | */ |
| 282 | public void removeCall(String callId) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 283 | for (ICallServiceAdapter adapter : mAdapters) { |
| 284 | try { |
| 285 | adapter.removeCall(callId); |
| 286 | } catch (RemoteException ignored) { |
| 287 | } |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 288 | } |
| 289 | } |
Evan Charlton | 6dea4ac | 2014-06-03 14:07:13 -0700 | [diff] [blame] | 290 | |
| 291 | public void onPostDialWait(String callId, String remaining) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 292 | for (ICallServiceAdapter adapter : mAdapters) { |
| 293 | try { |
| 294 | adapter.onPostDialWait(callId, remaining); |
| 295 | } catch (RemoteException ignored) { |
| 296 | } |
Evan Charlton | 6dea4ac | 2014-06-03 14:07:13 -0700 | [diff] [blame] | 297 | } |
| 298 | } |
Sailesh Nepal | 8b4818d | 2014-06-06 10:54:07 -0700 | [diff] [blame] | 299 | |
| 300 | /** |
| 301 | * Instructs Telecomm to handoff the call to another call service. |
| 302 | * |
| 303 | * @param callId The identifier of the call to handoff. |
| 304 | */ |
| 305 | public void handoffCall(String callId) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 306 | for (ICallServiceAdapter adapter : mAdapters) { |
| 307 | try { |
| 308 | adapter.handoffCall(callId); |
| 309 | } catch (RemoteException e) { |
| 310 | } |
Sailesh Nepal | 8b4818d | 2014-06-06 10:54:07 -0700 | [diff] [blame] | 311 | } |
| 312 | } |
Santos Cordon | b693998 | 2014-06-04 20:20:58 -0700 | [diff] [blame] | 313 | |
| 314 | /** |
| 315 | * Indicates that a new conference call has been created. |
| 316 | * |
| 317 | * @param callId The unique ID of the conference call. |
| 318 | */ |
| 319 | public void addConferenceCall(String callId) { |
Santos Cordon | 52d8a15 | 2014-06-17 19:08:45 -0700 | [diff] [blame] | 320 | for (ICallServiceAdapter adapter : mAdapters) { |
| 321 | try { |
| 322 | adapter.addConferenceCall(callId, null); |
| 323 | } catch (RemoteException ignored) { |
| 324 | } |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | /** |
| 329 | * Retrieves a list of remote connection services usable to place calls. |
| 330 | * @hide |
| 331 | */ |
| 332 | public void queryRemoteConnectionServices(RemoteServiceCallback callback) { |
| 333 | // Only supported when there is only one adapter. |
| 334 | if (mAdapters.size() == 1) { |
| 335 | try { |
| 336 | mAdapters.iterator().next().queryRemoteConnectionServices(callback); |
| 337 | } catch (RemoteException e) { |
| 338 | Log.e(this, e, "Exception trying to query for remote CSs"); |
| 339 | } |
Santos Cordon | b693998 | 2014-06-04 20:20:58 -0700 | [diff] [blame] | 340 | } |
| 341 | } |
Andrew Lee | 5ffbe8b | 2014-06-20 16:29:33 -0700 | [diff] [blame^] | 342 | |
| 343 | /** |
| 344 | * Sets the call video provider for a call. |
| 345 | * |
| 346 | * @param callId The unique ID of the call to set with the given call video provider. |
| 347 | * @param callVideoProvider The call video provider instance to set on the call. |
| 348 | */ |
| 349 | public void setCallVideoProvider(String callId, CallVideoProvider callVideoProvider) { |
| 350 | for (ICallServiceAdapter adapter : mAdapters) { |
| 351 | try { |
| 352 | adapter.setCallVideoProvider(callId, callVideoProvider.getInterface()); |
| 353 | } catch (RemoteException e) { |
| 354 | } |
| 355 | } |
| 356 | } |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 357 | } |