blob: ab35affe9099c4d9a5d7b885b4190013f908cf53 [file] [log] [blame]
Santos Cordon8f3fd302014-01-27 08:46:21 -08001/*
2 * Copyright (C) 2014 The Android Open Source Project
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
Tyler Gunnef9f6f92014-09-12 22:16:17 -070017package android.telecom;
Santos Cordon8f3fd302014-01-27 08:46:21 -080018
Ravi Palurif4b38e72020-02-05 12:35:41 +053019import android.annotation.NonNull;
Hall Liua98f58b52017-11-07 17:59:28 -080020import android.bluetooth.BluetoothDevice;
Hall Liu6dfa2492019-10-01 17:20:39 -070021import android.net.Uri;
Tyler Gunn876dbfb2016-03-14 15:18:07 -070022import android.os.Bundle;
Sailesh Nepalab5d2822014-03-08 18:01:06 -080023import android.os.RemoteException;
24
Tyler Gunnef9f6f92014-09-12 22:16:17 -070025import com.android.internal.telecom.IInCallAdapter;
Sailesh Nepalab5d2822014-03-08 18:01:06 -080026
Tyler Gunndee56a82016-03-23 16:06:34 -070027import java.util.List;
28
Santos Cordon8f3fd302014-01-27 08:46:21 -080029/**
Sailesh Nepalab5d2822014-03-08 18:01:06 -080030 * Receives commands from {@link InCallService} implementations which should be executed by
Tyler Gunnef9f6f92014-09-12 22:16:17 -070031 * Telecom. When Telecom binds to a {@link InCallService}, an instance of this class is given to
Santos Cordon8f3fd302014-01-27 08:46:21 -080032 * the in-call service through which it can manipulate live (active, dialing, ringing) calls. When
Ihab Awade63fadb2014-07-09 21:52:04 -070033 * the in-call service is notified of new calls, it can use the
Santos Cordon8f3fd302014-01-27 08:46:21 -080034 * given call IDs to execute commands such as {@link #answerCall} for incoming calls or
35 * {@link #disconnectCall} for active calls the user would like to end. Some commands are only
36 * appropriate for calls in certain states; please consult each method for such limitations.
Ihab Awadb19a0bc2014-08-07 19:46:01 -070037 * <p>
38 * The adapter will stop functioning when there are no more calls.
39 *
Hall Liu95d55872017-01-25 17:12:49 -080040 * @hide
Santos Cordon8f3fd302014-01-27 08:46:21 -080041 */
Sailesh Nepalab5d2822014-03-08 18:01:06 -080042public final class InCallAdapter {
43 private final IInCallAdapter mAdapter;
44
45 /**
46 * {@hide}
47 */
48 public InCallAdapter(IInCallAdapter adapter) {
49 mAdapter = adapter;
50 }
51
Santos Cordon8f3fd302014-01-27 08:46:21 -080052 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070053 * Instructs Telecom to answer the specified call.
Santos Cordon8f3fd302014-01-27 08:46:21 -080054 *
55 * @param callId The identifier of the call to answer.
Andrew Lee8da4c3c2014-07-16 10:11:42 -070056 * @param videoState The video state in which to answer the call.
Santos Cordon8f3fd302014-01-27 08:46:21 -080057 */
Andrew Lee8da4c3c2014-07-16 10:11:42 -070058 public void answerCall(String callId, int videoState) {
Sailesh Nepalab5d2822014-03-08 18:01:06 -080059 try {
Andrew Lee8da4c3c2014-07-16 10:11:42 -070060 mAdapter.answerCall(callId, videoState);
Sailesh Nepalab5d2822014-03-08 18:01:06 -080061 } catch (RemoteException e) {
62 }
63 }
Santos Cordon8f3fd302014-01-27 08:46:21 -080064
65 /**
Pooja Jaind34698d2017-12-28 14:15:31 +053066 * Instructs Telecom to deflect the specified call.
67 *
68 * @param callId The identifier of the call to deflect.
69 * @param address The address to deflect.
70 */
71 public void deflectCall(String callId, Uri address) {
72 try {
73 mAdapter.deflectCall(callId, address);
74 } catch (RemoteException e) {
75 }
76 }
77
78 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070079 * Instructs Telecom to reject the specified call.
Santos Cordon8f3fd302014-01-27 08:46:21 -080080 *
81 * @param callId The identifier of the call to reject.
Ihab Awadc0677542014-06-10 13:29:47 -070082 * @param rejectWithMessage Whether to reject with a text message.
83 * @param textMessage An optional text message with which to respond.
Santos Cordon8f3fd302014-01-27 08:46:21 -080084 */
Ihab Awadc0677542014-06-10 13:29:47 -070085 public void rejectCall(String callId, boolean rejectWithMessage, String textMessage) {
Sailesh Nepalab5d2822014-03-08 18:01:06 -080086 try {
Ihab Awadc0677542014-06-10 13:29:47 -070087 mAdapter.rejectCall(callId, rejectWithMessage, textMessage);
Sailesh Nepalab5d2822014-03-08 18:01:06 -080088 } catch (RemoteException e) {
89 }
90 }
Santos Cordon8f3fd302014-01-27 08:46:21 -080091
92 /**
Tyler Gunnfacfdee2020-01-23 13:10:37 -080093 * Instructs Telecom to reject the specified call.
94 *
95 * @param callId The identifier of the call to reject.
96 * @param rejectReason The reason the call was rejected.
97 */
98 public void rejectCall(String callId, @Call.RejectReason int rejectReason) {
99 try {
100 mAdapter.rejectCallWithReason(callId, rejectReason);
101 } catch (RemoteException e) {
102 }
103 }
104
105 /**
Ravi Palurif4b38e72020-02-05 12:35:41 +0530106 * Instructs Telecom to transfer the specified call.
107 *
108 * @param callId The identifier of the call to transfer.
109 * @param targetNumber The address to transfer to.
Tyler Gunn460360d2020-07-29 10:21:45 -0700110 * @param isConfirmationRequired if {@code true} it will initiate a confirmed transfer,
111 * if {@code false}, it will initiate unconfirmed transfer.
Ravi Palurif4b38e72020-02-05 12:35:41 +0530112 */
113 public void transferCall(@NonNull String callId, @NonNull Uri targetNumber,
114 boolean isConfirmationRequired) {
115 try {
116 mAdapter.transferCall(callId, targetNumber, isConfirmationRequired);
117 } catch (RemoteException e) {
118 }
119 }
120
121 /**
122 * Instructs Telecom to transfer the specified call to another ongoing call.
123 *
124 * @param callId The identifier of the call to transfer.
125 * @param otherCallId The identifier of the other call to which this will be transferred.
126 */
127 public void transferCall(@NonNull String callId, @NonNull String otherCallId) {
128 try {
129 mAdapter.consultativeTransfer(callId, otherCallId);
130 } catch (RemoteException e) {
131 }
132 }
133
134 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700135 * Instructs Telecom to disconnect the specified call.
Santos Cordon8f3fd302014-01-27 08:46:21 -0800136 *
137 * @param callId The identifier of the call to disconnect.
138 */
Sailesh Nepalab5d2822014-03-08 18:01:06 -0800139 public void disconnectCall(String callId) {
140 try {
141 mAdapter.disconnectCall(callId);
142 } catch (RemoteException e) {
143 }
144 }
Yorke Lee81ccaaa2014-03-12 18:33:19 -0700145
146 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700147 * Instructs Telecom to put the specified call on hold.
Yorke Lee81ccaaa2014-03-12 18:33:19 -0700148 *
149 * @param callId The identifier of the call to put on hold.
150 */
151 public void holdCall(String callId) {
152 try {
153 mAdapter.holdCall(callId);
154 } catch (RemoteException e) {
155 }
156 }
157
158 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700159 * Instructs Telecom to release the specified call from hold.
Yorke Lee81ccaaa2014-03-12 18:33:19 -0700160 *
161 * @param callId The identifier of the call to release from hold.
162 */
163 public void unholdCall(String callId) {
164 try {
165 mAdapter.unholdCall(callId);
166 } catch (RemoteException e) {
167 }
168 }
Sailesh Nepal4cff3922014-03-19 10:15:37 -0700169
170 /**
171 * Mute the microphone.
172 *
173 * @param shouldMute True if the microphone should be muted.
174 */
175 public void mute(boolean shouldMute) {
176 try {
177 mAdapter.mute(shouldMute);
178 } catch (RemoteException e) {
179 }
180 }
181
182 /**
Yorke Lee4af59352015-05-13 14:14:54 -0700183 * Sets the audio route (speaker, bluetooth, etc...). See {@link CallAudioState}.
Sailesh Nepal4cff3922014-03-19 10:15:37 -0700184 *
185 * @param route The audio route to use.
186 */
187 public void setAudioRoute(int route) {
188 try {
Hall Liua98f58b52017-11-07 17:59:28 -0800189 mAdapter.setAudioRoute(route, null);
190 } catch (RemoteException e) {
191 }
192 }
193
194 /**
Hall Liu6dfa2492019-10-01 17:20:39 -0700195 * @see Call#enterBackgroundAudioProcessing()
196 */
197 public void enterBackgroundAudioProcessing(String callId) {
198 try {
199 mAdapter.enterBackgroundAudioProcessing(callId);
200 } catch (RemoteException e) {
201 }
202 }
203
204 /**
205 * @see Call#exitBackgroundAudioProcessing(boolean)
206 */
207 public void exitBackgroundAudioProcessing(String callId, boolean shouldRing) {
208 try {
209 mAdapter.exitBackgroundAudioProcessing(callId, shouldRing);
210 } catch (RemoteException e) {
211 }
212 }
213
214 /**
Hall Liua98f58b52017-11-07 17:59:28 -0800215 * Request audio routing to a specific bluetooth device. Calling this method may result in
216 * the device routing audio to a different bluetooth device than the one specified. A list of
217 * available devices can be obtained via {@link CallAudioState#getSupportedBluetoothDevices()}
218 *
219 * @param bluetoothAddress The address of the bluetooth device to connect to, as returned by
220 * {@link BluetoothDevice#getAddress()}, or {@code null} if no device is preferred.
221 */
222 public void requestBluetoothAudio(String bluetoothAddress) {
223 try {
224 mAdapter.setAudioRoute(CallAudioState.ROUTE_BLUETOOTH, bluetoothAddress);
Sailesh Nepal4cff3922014-03-19 10:15:37 -0700225 } catch (RemoteException e) {
226 }
227 }
Ihab Awad2f236642014-03-10 15:33:45 -0700228
229 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700230 * Instructs Telecom to play a dual-tone multi-frequency signaling (DTMF) tone in a call.
Ihab Awad2f236642014-03-10 15:33:45 -0700231 *
232 * Any other currently playing DTMF tone in the specified call is immediately stopped.
233 *
234 * @param callId The unique ID of the call in which the tone will be played.
235 * @param digit A character representing the DTMF digit for which to play the tone. This
236 * value must be one of {@code '0'} through {@code '9'}, {@code '*'} or {@code '#'}.
237 */
238 public void playDtmfTone(String callId, char digit) {
239 try {
240 mAdapter.playDtmfTone(callId, digit);
241 } catch (RemoteException e) {
242 }
243 }
244
245 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700246 * Instructs Telecom to stop any dual-tone multi-frequency signaling (DTMF) tone currently
Ihab Awad2f236642014-03-10 15:33:45 -0700247 * playing.
248 *
249 * DTMF tones are played by calling {@link #playDtmfTone(String,char)}. If no DTMF tone is
250 * currently playing, this method will do nothing.
251 *
252 * @param callId The unique ID of the call in which any currently playing tone will be stopped.
253 */
254 public void stopDtmfTone(String callId) {
255 try {
256 mAdapter.stopDtmfTone(callId);
257 } catch (RemoteException e) {
258 }
259 }
260
261 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700262 * Instructs Telecom to continue playing a post-dial DTMF string.
Ihab Awad2f236642014-03-10 15:33:45 -0700263 *
264 * A post-dial DTMF string is a string of digits entered after a phone number, when dialed,
265 * that are immediately sent as DTMF tones to the recipient as soon as the connection is made.
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700266 * While these tones are playing, Telecom will notify the {@link InCallService} that the call
Ihab Awade63fadb2014-07-09 21:52:04 -0700267 * is in the post dial state.
Ihab Awad2f236642014-03-10 15:33:45 -0700268 *
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700269 * If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_PAUSE} symbol, Telecom
Evan Charlton8acdbb82014-04-01 13:50:07 -0700270 * will temporarily pause playing the tones for a pre-defined period of time.
Ihab Awad2f236642014-03-10 15:33:45 -0700271 *
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700272 * If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_WAIT} symbol, Telecom
Evan Charlton8acdbb82014-04-01 13:50:07 -0700273 * will pause playing the tones and notify the {@link InCallService} that the call is in the
Ihab Awade63fadb2014-07-09 21:52:04 -0700274 * post dial wait state. When the user decides to continue the postdial sequence, the
275 * {@link InCallService} should invoke the {@link #postDialContinue(String,boolean)} method.
Ihab Awad2f236642014-03-10 15:33:45 -0700276 *
277 * @param callId The unique ID of the call for which postdial string playing should continue.
Evan Charlton6dea4ac2014-06-03 14:07:13 -0700278 * @param proceed Whether or not to continue with the post-dial sequence.
Ihab Awad2f236642014-03-10 15:33:45 -0700279 */
Evan Charlton6dea4ac2014-06-03 14:07:13 -0700280 public void postDialContinue(String callId, boolean proceed) {
Ihab Awad2f236642014-03-10 15:33:45 -0700281 try {
Evan Charlton6dea4ac2014-06-03 14:07:13 -0700282 mAdapter.postDialContinue(callId, proceed);
Ihab Awad2f236642014-03-10 15:33:45 -0700283 } catch (RemoteException e) {
284 }
285 }
Sailesh Nepalb632e5b2014-04-03 12:54:33 -0700286
287 /**
Nancy Chen36c62f32014-10-21 18:36:39 -0700288 * Instructs Telecom to add a PhoneAccountHandle to the specified call.
Nancy Chen5da0fd52014-07-08 14:16:17 -0700289 *
Nancy Chen36c62f32014-10-21 18:36:39 -0700290 * @param callId The identifier of the call.
291 * @param accountHandle The PhoneAccountHandle through which to place the call.
292 * @param setDefault {@code True} if this account should be set as the default for calls.
Nancy Chen5da0fd52014-07-08 14:16:17 -0700293 */
Nancy Chen36c62f32014-10-21 18:36:39 -0700294 public void phoneAccountSelected(String callId, PhoneAccountHandle accountHandle,
295 boolean setDefault) {
Nancy Chen5da0fd52014-07-08 14:16:17 -0700296 try {
Nancy Chen36c62f32014-10-21 18:36:39 -0700297 mAdapter.phoneAccountSelected(callId, accountHandle, setDefault);
Nancy Chen5da0fd52014-07-08 14:16:17 -0700298 } catch (RemoteException e) {
299 }
300 }
301
302 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700303 * Instructs Telecom to conference the specified call.
Santos Cordon980acb92014-05-31 10:31:19 -0700304 *
305 * @param callId The unique ID of the call.
Santos Cordon980acb92014-05-31 10:31:19 -0700306 * @hide
307 */
Santos Cordon7c7bc7f2014-07-28 18:15:48 -0700308 public void conference(String callId, String otherCallId) {
Santos Cordon980acb92014-05-31 10:31:19 -0700309 try {
Santos Cordon7c7bc7f2014-07-28 18:15:48 -0700310 mAdapter.conference(callId, otherCallId);
Santos Cordon980acb92014-05-31 10:31:19 -0700311 } catch (RemoteException ignored) {
312 }
313 }
314
315 /**
Ravi Paluri404babb2020-01-23 19:02:44 +0530316 * Instructs Telecom to pull participants to existing call
317 *
318 * @param callId The unique ID of the call.
319 * @param participants participants to be pulled to existing call.
320 */
321 public void addConferenceParticipants(String callId, List<Uri> participants) {
322 try {
323 mAdapter.addConferenceParticipants(callId, participants);
324 } catch (RemoteException ignored) {
325 }
326 }
327
328
329 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700330 * Instructs Telecom to split the specified call from any conference call with which it may be
Santos Cordon980acb92014-05-31 10:31:19 -0700331 * connected.
332 *
333 * @param callId The unique ID of the call.
334 * @hide
335 */
Santos Cordonb6939982014-06-04 20:20:58 -0700336 public void splitFromConference(String callId) {
Santos Cordon980acb92014-05-31 10:31:19 -0700337 try {
338 mAdapter.splitFromConference(callId);
339 } catch (RemoteException ignored) {
340 }
341 }
Sailesh Nepal61203862014-07-11 14:50:13 -0700342
343 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700344 * Instructs Telecom to merge child calls of the specified conference call.
Santos Cordona4868042014-09-04 17:39:22 -0700345 */
346 public void mergeConference(String callId) {
347 try {
348 mAdapter.mergeConference(callId);
349 } catch (RemoteException ignored) {
350 }
351 }
352
353 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700354 * Instructs Telecom to swap the child calls of the specified conference call.
Santos Cordona4868042014-09-04 17:39:22 -0700355 */
356 public void swapConference(String callId) {
357 try {
358 mAdapter.swapConference(callId);
359 } catch (RemoteException ignored) {
360 }
361 }
362
363 /**
Tyler Gunn876dbfb2016-03-14 15:18:07 -0700364 * Instructs Telecom to pull an external call to the local device.
365 *
366 * @param callId The callId to pull.
367 */
368 public void pullExternalCall(String callId) {
369 try {
370 mAdapter.pullExternalCall(callId);
371 } catch (RemoteException ignored) {
372 }
373 }
374
375 /**
376 * Intructs Telecom to send a call event.
377 *
378 * @param callId The callId to send the event for.
379 * @param event The event.
Sanket Padawef6a9e5b2018-01-05 14:26:16 -0800380 * @param targetSdkVer Target sdk version of the app calling this api
Tyler Gunn876dbfb2016-03-14 15:18:07 -0700381 * @param extras Extras associated with the event.
382 */
Sanket Padawef6a9e5b2018-01-05 14:26:16 -0800383 public void sendCallEvent(String callId, String event, int targetSdkVer, Bundle extras) {
Tyler Gunn876dbfb2016-03-14 15:18:07 -0700384 try {
Sanket Padawef6a9e5b2018-01-05 14:26:16 -0800385 mAdapter.sendCallEvent(callId, event, targetSdkVer, extras);
Tyler Gunn876dbfb2016-03-14 15:18:07 -0700386 } catch (RemoteException ignored) {
387 }
388 }
389
390 /**
Tyler Gunndee56a82016-03-23 16:06:34 -0700391 * Intructs Telecom to add extras to a call.
392 *
393 * @param callId The callId to add the extras to.
394 * @param extras The extras.
395 */
396 public void putExtras(String callId, Bundle extras) {
397 try {
398 mAdapter.putExtras(callId, extras);
399 } catch (RemoteException ignored) {
400 }
401 }
402
403 /**
404 * Intructs Telecom to add an extra to a call.
405 *
406 * @param callId The callId to add the extras to.
407 * @param key The extra key.
408 * @param value The extra value.
409 */
410 public void putExtra(String callId, String key, boolean value) {
411 try {
412 Bundle bundle = new Bundle();
413 bundle.putBoolean(key, value);
414 mAdapter.putExtras(callId, bundle);
415 } catch (RemoteException ignored) {
416 }
417 }
418
419 /**
420 * Intructs Telecom to add an extra to a call.
421 *
422 * @param callId The callId to add the extras to.
423 * @param key The extra key.
424 * @param value The extra value.
425 */
426 public void putExtra(String callId, String key, int value) {
427 try {
428 Bundle bundle = new Bundle();
429 bundle.putInt(key, value);
430 mAdapter.putExtras(callId, bundle);
431 } catch (RemoteException ignored) {
432 }
433 }
434
435 /**
436 * Intructs Telecom to add an extra to a call.
437 *
438 * @param callId The callId to add the extras to.
439 * @param key The extra key.
440 * @param value The extra value.
441 */
442 public void putExtra(String callId, String key, String value) {
443 try {
444 Bundle bundle = new Bundle();
445 bundle.putString(key, value);
446 mAdapter.putExtras(callId, bundle);
447 } catch (RemoteException ignored) {
448 }
449 }
450
451 /**
452 * Intructs Telecom to remove extras from a call.
453 * @param callId The callId to remove the extras from.
454 * @param keys The extra keys to remove.
455 */
456 public void removeExtras(String callId, List<String> keys) {
457 try {
458 mAdapter.removeExtras(callId, keys);
459 } catch (RemoteException ignored) {
460 }
461 }
462
463 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700464 * Instructs Telecom to turn the proximity sensor on.
Yorke Lee0d6ea712014-07-28 14:39:23 -0700465 */
466 public void turnProximitySensorOn() {
467 try {
468 mAdapter.turnOnProximitySensor();
469 } catch (RemoteException ignored) {
470 }
471 }
472
473 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700474 * Instructs Telecom to turn the proximity sensor off.
Yorke Lee0d6ea712014-07-28 14:39:23 -0700475 *
476 * @param screenOnImmediately If true, the screen will be turned on immediately if it was
477 * previously off. Otherwise, the screen will only be turned on after the proximity sensor
478 * is no longer triggered.
479 */
480 public void turnProximitySensorOff(boolean screenOnImmediately) {
481 try {
482 mAdapter.turnOffProximitySensor(screenOnImmediately);
483 } catch (RemoteException ignored) {
484 }
485 }
Hall Liu95d55872017-01-25 17:12:49 -0800486
487 /**
488 * Sends an RTT upgrade request to the remote end of the connection.
489 */
Hall Liu57006aa2017-02-06 10:49:48 -0800490 public void sendRttRequest(String callId) {
Hall Liu95d55872017-01-25 17:12:49 -0800491 try {
Hall Liu57006aa2017-02-06 10:49:48 -0800492 mAdapter.sendRttRequest(callId);
Hall Liu95d55872017-01-25 17:12:49 -0800493 } catch (RemoteException ignored) {
494 }
495 }
496
497 /**
498 * Responds to an RTT upgrade request initiated from the remote end.
499 *
500 * @param id the ID of the request as specified by Telecom
501 * @param accept Whether the request should be accepted.
502 */
Hall Liu57006aa2017-02-06 10:49:48 -0800503 public void respondToRttRequest(String callId, int id, boolean accept) {
Hall Liu95d55872017-01-25 17:12:49 -0800504 try {
Hall Liu57006aa2017-02-06 10:49:48 -0800505 mAdapter.respondToRttRequest(callId, id, accept);
Hall Liu95d55872017-01-25 17:12:49 -0800506 } catch (RemoteException ignored) {
507 }
508 }
509
510 /**
511 * Instructs Telecom to shut down the RTT communication channel.
512 */
Hall Liu57006aa2017-02-06 10:49:48 -0800513 public void stopRtt(String callId) {
Hall Liu95d55872017-01-25 17:12:49 -0800514 try {
Hall Liu57006aa2017-02-06 10:49:48 -0800515 mAdapter.stopRtt(callId);
Hall Liu95d55872017-01-25 17:12:49 -0800516 } catch (RemoteException ignored) {
517 }
518 }
519
520 /**
521 * Sets the RTT audio mode.
522 * @param mode the desired RTT audio mode
523 */
Hall Liu57006aa2017-02-06 10:49:48 -0800524 public void setRttMode(String callId, int mode) {
Hall Liu95d55872017-01-25 17:12:49 -0800525 try {
Hall Liu57006aa2017-02-06 10:49:48 -0800526 mAdapter.setRttMode(callId, mode);
Hall Liu95d55872017-01-25 17:12:49 -0800527 } catch (RemoteException ignored) {
528 }
529 }
Sanket Padawea8eddd42017-11-03 11:07:35 -0700530
531
532 /**
533 * Initiates a handover of this {@link Call} to the {@link ConnectionService} identified
534 * by destAcct.
535 * @param callId The callId of the Call which calls this function.
536 * @param destAcct ConnectionService to which the call should be handed over.
537 * @param videoState The video state desired after the handover.
538 * @param extras Extra information to be passed to ConnectionService
539 */
540 public void handoverTo(String callId, PhoneAccountHandle destAcct, int videoState,
541 Bundle extras) {
542 try {
543 mAdapter.handoverTo(callId, destAcct, videoState, extras);
544 } catch (RemoteException ignored) {
545 }
546 }
Santos Cordon8f3fd302014-01-27 08:46:21 -0800547}