| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.telecom; |
| 18 |
|
| 19 |
import android.net.Uri; |
| 20 |
import android.os.Bundle; |
| 21 |
import android.os.IBinder.DeathRecipient; |
| 22 |
import android.os.RemoteException; |
| 23 |
|
| 24 |
import com.android.internal.telecom.IConnectionServiceAdapter; |
| 25 |
import com.android.internal.telecom.RemoteServiceCallback; |
| 26 |
|
| 27 |
import java.util.Collections; |
| 28 |
import java.util.Iterator; |
| 29 |
import java.util.List; |
| 30 |
import java.util.Set; |
| 31 |
import java.util.concurrent.ConcurrentHashMap; |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
final class ConnectionServiceAdapter implements DeathRecipient { |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
private final Set<IConnectionServiceAdapter> mAdapters = Collections.newSetFromMap( |
| 45 |
new ConcurrentHashMap<IConnectionServiceAdapter, Boolean>(8, 0.9f, 1)); |
| 46 |
|
| 47 |
ConnectionServiceAdapter() { |
| 48 |
} |
| 49 |
|
| 50 |
void addAdapter(IConnectionServiceAdapter adapter) { |
| 51 |
for (IConnectionServiceAdapter it : mAdapters) { |
| 52 |
if (it.asBinder() == adapter.asBinder()) { |
| 53 |
Log.w(this, "Ignoring duplicate adapter addition."); |
| 54 |
return; |
| 55 |
} |
| 56 |
} |
| 57 |
if (mAdapters.add(adapter)) { |
| 58 |
try { |
| 59 |
adapter.asBinder().linkToDeath(this, 0); |
| 60 |
} catch (RemoteException e) { |
| 61 |
mAdapters.remove(adapter); |
| 62 |
} |
| 63 |
} |
| 64 |
} |
| 65 |
|
| 66 |
void removeAdapter(IConnectionServiceAdapter adapter) { |
| 67 |
if (adapter != null) { |
| 68 |
for (IConnectionServiceAdapter it : mAdapters) { |
| 69 |
if (it.asBinder() == adapter.asBinder() && mAdapters.remove(it)) { |
| 70 |
adapter.asBinder().unlinkToDeath(this, 0); |
| 71 |
break; |
| 72 |
} |
| 73 |
} |
| 74 |
} |
| 75 |
} |
| 76 |
|
| 77 |
|
| 78 |
@Override |
| 79 |
public void binderDied() { |
| 80 |
Iterator<IConnectionServiceAdapter> it = mAdapters.iterator(); |
| 81 |
while (it.hasNext()) { |
| 82 |
IConnectionServiceAdapter adapter = it.next(); |
| 83 |
if (!adapter.asBinder().isBinderAlive()) { |
| 84 |
it.remove(); |
| 85 |
adapter.asBinder().unlinkToDeath(this, 0); |
| 86 |
} |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
void handleCreateConnectionComplete( |
| 91 |
String id, |
| 92 |
ConnectionRequest request, |
| 93 |
ParcelableConnection connection) { |
| 94 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 95 |
try { |
| 96 |
adapter.handleCreateConnectionComplete(id, request, connection, |
| 97 |
Log.getExternalSession()); |
| 98 |
} catch (RemoteException e) { |
| 99 |
} |
| 100 |
} |
| 101 |
} |
| 102 |
|
| 103 |
void handleCreateConferenceComplete( |
| 104 |
String id, |
| 105 |
ConnectionRequest request, |
| 106 |
ParcelableConference conference) { |
| 107 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 108 |
try { |
| 109 |
adapter.handleCreateConferenceComplete(id, request, conference, |
| 110 |
Log.getExternalSession()); |
| 111 |
} catch (RemoteException e) { |
| 112 |
} |
| 113 |
} |
| 114 |
} |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
void setActive(String callId) { |
| 123 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 124 |
try { |
| 125 |
adapter.setActive(callId, Log.getExternalSession()); |
| 126 |
} catch (RemoteException e) { |
| 127 |
} |
| 128 |
} |
| 129 |
} |
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
void setRinging(String callId) { |
| 137 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 138 |
try { |
| 139 |
adapter.setRinging(callId, Log.getExternalSession()); |
| 140 |
} catch (RemoteException e) { |
| 141 |
} |
| 142 |
} |
| 143 |
} |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
void setDialing(String callId) { |
| 151 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 152 |
try { |
| 153 |
adapter.setDialing(callId, Log.getExternalSession()); |
| 154 |
} catch (RemoteException e) { |
| 155 |
} |
| 156 |
} |
| 157 |
} |
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
void setPulling(String callId) { |
| 166 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 167 |
try { |
| 168 |
adapter.setPulling(callId, Log.getExternalSession()); |
| 169 |
} catch (RemoteException e) { |
| 170 |
} |
| 171 |
} |
| 172 |
} |
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
void setDisconnected(String callId, DisconnectCause disconnectCause) { |
| 182 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 183 |
try { |
| 184 |
adapter.setDisconnected(callId, disconnectCause, Log.getExternalSession()); |
| 185 |
} catch (RemoteException e) { |
| 186 |
} |
| 187 |
} |
| 188 |
} |
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
void setOnHold(String callId) { |
| 196 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 197 |
try { |
| 198 |
adapter.setOnHold(callId, Log.getExternalSession()); |
| 199 |
} catch (RemoteException e) { |
| 200 |
} |
| 201 |
} |
| 202 |
} |
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
void setRingbackRequested(String callId, boolean ringback) { |
| 211 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 212 |
try { |
| 213 |
adapter.setRingbackRequested(callId, ringback, Log.getExternalSession()); |
| 214 |
} catch (RemoteException e) { |
| 215 |
} |
| 216 |
} |
| 217 |
} |
| 218 |
|
| 219 |
void setConnectionCapabilities(String callId, int capabilities) { |
| 220 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 221 |
try { |
| 222 |
adapter.setConnectionCapabilities(callId, capabilities, Log.getExternalSession()); |
| 223 |
} catch (RemoteException ignored) { |
| 224 |
} |
| 225 |
} |
| 226 |
} |
| 227 |
|
| 228 |
void setConnectionProperties(String callId, int properties) { |
| 229 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 230 |
try { |
| 231 |
adapter.setConnectionProperties(callId, properties, Log.getExternalSession()); |
| 232 |
} catch (RemoteException ignored) { |
| 233 |
} |
| 234 |
} |
| 235 |
} |
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
void setIsConferenced(String callId, String conferenceCallId) { |
| 246 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 247 |
try { |
| 248 |
Log.d(this, "sending connection %s with conference %s", callId, conferenceCallId); |
| 249 |
adapter.setIsConferenced(callId, conferenceCallId, Log.getExternalSession()); |
| 250 |
} catch (RemoteException ignored) { |
| 251 |
} |
| 252 |
} |
| 253 |
} |
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
void onConferenceMergeFailed(String callId) { |
| 261 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 262 |
try { |
| 263 |
Log.d(this, "merge failed for call %s", callId); |
| 264 |
adapter.setConferenceMergeFailed(callId, Log.getExternalSession()); |
| 265 |
} catch (RemoteException ignored) { |
| 266 |
} |
| 267 |
} |
| 268 |
} |
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
void resetConnectionTime(String callId) { |
| 274 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 275 |
try { |
| 276 |
adapter.resetConnectionTime(callId, Log.getExternalSession()); |
| 277 |
} catch (RemoteException e) { |
| 278 |
} |
| 279 |
} |
| 280 |
} |
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
void removeCall(String callId) { |
| 289 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 290 |
try { |
| 291 |
adapter.removeCall(callId, Log.getExternalSession()); |
| 292 |
} catch (RemoteException ignored) { |
| 293 |
} |
| 294 |
} |
| 295 |
} |
| 296 |
|
| 297 |
void onPostDialWait(String callId, String remaining) { |
| 298 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 299 |
try { |
| 300 |
adapter.onPostDialWait(callId, remaining, Log.getExternalSession()); |
| 301 |
} catch (RemoteException ignored) { |
| 302 |
} |
| 303 |
} |
| 304 |
} |
| 305 |
|
| 306 |
void onPostDialChar(String callId, char nextChar) { |
| 307 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 308 |
try { |
| 309 |
adapter.onPostDialChar(callId, nextChar, Log.getExternalSession()); |
| 310 |
} catch (RemoteException ignored) { |
| 311 |
} |
| 312 |
} |
| 313 |
} |
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
void addConferenceCall(String callId, ParcelableConference parcelableConference) { |
| 321 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 322 |
try { |
| 323 |
adapter.addConferenceCall(callId, parcelableConference, Log.getExternalSession()); |
| 324 |
} catch (RemoteException ignored) { |
| 325 |
} |
| 326 |
} |
| 327 |
} |
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
void queryRemoteConnectionServices(RemoteServiceCallback callback, String callingPackage) { |
| 333 |
|
| 334 |
if (mAdapters.size() == 1) { |
| 335 |
try { |
| 336 |
mAdapters.iterator().next().queryRemoteConnectionServices(callback, callingPackage, |
| 337 |
Log.getExternalSession()); |
| 338 |
} catch (RemoteException e) { |
| 339 |
Log.e(this, e, "Exception trying to query for remote CSs"); |
| 340 |
} |
| 341 |
} else { |
| 342 |
try { |
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
callback.onResult(Collections.EMPTY_LIST, Collections.EMPTY_LIST); |
| 347 |
} catch (RemoteException e) { |
| 348 |
Log.e(this, e, "Exception trying to query for remote CSs"); |
| 349 |
} |
| 350 |
} |
| 351 |
} |
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
void setVideoProvider( |
| 360 |
String callId, Connection.VideoProvider videoProvider) { |
| 361 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 362 |
try { |
| 363 |
adapter.setVideoProvider( |
| 364 |
callId, |
| 365 |
videoProvider == null ? null : videoProvider.getInterface(), |
| 366 |
Log.getExternalSession()); |
| 367 |
} catch (RemoteException e) { |
| 368 |
} |
| 369 |
} |
| 370 |
} |
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
void setIsVoipAudioMode(String callId, boolean isVoip) { |
| 379 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 380 |
try { |
| 381 |
adapter.setIsVoipAudioMode(callId, isVoip, Log.getExternalSession()); |
| 382 |
} catch (RemoteException e) { |
| 383 |
} |
| 384 |
} |
| 385 |
} |
| 386 |
|
| 387 |
void setStatusHints(String callId, StatusHints statusHints) { |
| 388 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 389 |
try { |
| 390 |
adapter.setStatusHints(callId, statusHints, Log.getExternalSession()); |
| 391 |
} catch (RemoteException e) { |
| 392 |
} |
| 393 |
} |
| 394 |
} |
| 395 |
|
| 396 |
void setAddress(String callId, Uri address, int presentation) { |
| 397 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 398 |
try { |
| 399 |
adapter.setAddress(callId, address, presentation, Log.getExternalSession()); |
| 400 |
} catch (RemoteException e) { |
| 401 |
} |
| 402 |
} |
| 403 |
} |
| 404 |
|
| 405 |
void setCallerDisplayName(String callId, String callerDisplayName, int presentation) { |
| 406 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 407 |
try { |
| 408 |
adapter.setCallerDisplayName(callId, callerDisplayName, presentation, |
| 409 |
Log.getExternalSession()); |
| 410 |
} catch (RemoteException e) { |
| 411 |
} |
| 412 |
} |
| 413 |
} |
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
void setVideoState(String callId, int videoState) { |
| 427 |
Log.v(this, "setVideoState: %d", videoState); |
| 428 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 429 |
try { |
| 430 |
adapter.setVideoState(callId, videoState, Log.getExternalSession()); |
| 431 |
} catch (RemoteException ignored) { |
| 432 |
} |
| 433 |
} |
| 434 |
} |
| 435 |
|
| 436 |
void setConferenceableConnections(String callId, List<String> conferenceableCallIds) { |
| 437 |
Log.v(this, "setConferenceableConnections: %s, %s", callId, conferenceableCallIds); |
| 438 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 439 |
try { |
| 440 |
adapter.setConferenceableConnections(callId, conferenceableCallIds, |
| 441 |
Log.getExternalSession()); |
| 442 |
} catch (RemoteException ignored) { |
| 443 |
} |
| 444 |
} |
| 445 |
} |
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
void addExistingConnection(String callId, ParcelableConnection connection) { |
| 454 |
Log.v(this, "addExistingConnection: %s", callId); |
| 455 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 456 |
try { |
| 457 |
adapter.addExistingConnection(callId, connection, Log.getExternalSession()); |
| 458 |
} catch (RemoteException ignored) { |
| 459 |
} |
| 460 |
} |
| 461 |
} |
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
void putExtras(String callId, Bundle extras) { |
| 470 |
Log.v(this, "putExtras: %s", callId); |
| 471 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 472 |
try { |
| 473 |
adapter.putExtras(callId, extras, Log.getExternalSession()); |
| 474 |
} catch (RemoteException ignored) { |
| 475 |
} |
| 476 |
} |
| 477 |
} |
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
void putExtra(String callId, String key, boolean value) { |
| 487 |
Log.v(this, "putExtra: %s %s=%b", callId, key, value); |
| 488 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 489 |
try { |
| 490 |
Bundle bundle = new Bundle(); |
| 491 |
bundle.putBoolean(key, value); |
| 492 |
adapter.putExtras(callId, bundle, Log.getExternalSession()); |
| 493 |
} catch (RemoteException ignored) { |
| 494 |
} |
| 495 |
} |
| 496 |
} |
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
void putExtra(String callId, String key, int value) { |
| 506 |
Log.v(this, "putExtra: %s %s=%d", callId, key, value); |
| 507 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 508 |
try { |
| 509 |
Bundle bundle = new Bundle(); |
| 510 |
bundle.putInt(key, value); |
| 511 |
adapter.putExtras(callId, bundle, Log.getExternalSession()); |
| 512 |
} catch (RemoteException ignored) { |
| 513 |
} |
| 514 |
} |
| 515 |
} |
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
void putExtra(String callId, String key, String value) { |
| 525 |
Log.v(this, "putExtra: %s %s=%s", callId, key, value); |
| 526 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 527 |
try { |
| 528 |
Bundle bundle = new Bundle(); |
| 529 |
bundle.putString(key, value); |
| 530 |
adapter.putExtras(callId, bundle, Log.getExternalSession()); |
| 531 |
} catch (RemoteException ignored) { |
| 532 |
} |
| 533 |
} |
| 534 |
} |
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
void removeExtras(String callId, List<String> keys) { |
| 542 |
Log.v(this, "removeExtras: %s %s", callId, keys); |
| 543 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 544 |
try { |
| 545 |
adapter.removeExtras(callId, keys, Log.getExternalSession()); |
| 546 |
} catch (RemoteException ignored) { |
| 547 |
} |
| 548 |
} |
| 549 |
} |
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
void setAudioRoute(String callId, int audioRoute, String bluetoothAddress) { |
| 558 |
Log.v(this, "setAudioRoute: %s %s %s", callId, |
| 559 |
CallAudioState.audioRouteToString(audioRoute), |
| 560 |
bluetoothAddress); |
| 561 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 562 |
try { |
| 563 |
adapter.setAudioRoute(callId, audioRoute, |
| 564 |
bluetoothAddress, Log.getExternalSession()); |
| 565 |
} catch (RemoteException ignored) { |
| 566 |
} |
| 567 |
} |
| 568 |
} |
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
|
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
|
| 578 |
void onConnectionEvent(String callId, String event, Bundle extras) { |
| 579 |
Log.v(this, "onConnectionEvent: %s", event); |
| 580 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 581 |
try { |
| 582 |
adapter.onConnectionEvent(callId, event, extras, Log.getExternalSession()); |
| 583 |
} catch (RemoteException ignored) { |
| 584 |
} |
| 585 |
} |
| 586 |
} |
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
|
| 592 |
|
| 593 |
void onRttInitiationSuccess(String callId) { |
| 594 |
Log.v(this, "onRttInitiationSuccess: %s", callId); |
| 595 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 596 |
try { |
| 597 |
adapter.onRttInitiationSuccess(callId, Log.getExternalSession()); |
| 598 |
} catch (RemoteException ignored) { |
| 599 |
} |
| 600 |
} |
| 601 |
} |
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
void onRttInitiationFailure(String callId, int reason) { |
| 609 |
Log.v(this, "onRttInitiationFailure: %s", callId); |
| 610 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 611 |
try { |
| 612 |
adapter.onRttInitiationFailure(callId, reason, Log.getExternalSession()); |
| 613 |
} catch (RemoteException ignored) { |
| 614 |
} |
| 615 |
} |
| 616 |
} |
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
void onRttSessionRemotelyTerminated(String callId) { |
| 625 |
Log.v(this, "onRttSessionRemotelyTerminated: %s", callId); |
| 626 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 627 |
try { |
| 628 |
adapter.onRttSessionRemotelyTerminated(callId, Log.getExternalSession()); |
| 629 |
} catch (RemoteException ignored) { |
| 630 |
} |
| 631 |
} |
| 632 |
} |
| 633 |
|
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
|
| 638 |
|
| 639 |
|
| 640 |
void onRemoteRttRequest(String callId) { |
| 641 |
Log.v(this, "onRemoteRttRequest: %s", callId); |
| 642 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 643 |
try { |
| 644 |
adapter.onRemoteRttRequest(callId, Log.getExternalSession()); |
| 645 |
} catch (RemoteException ignored) { |
| 646 |
} |
| 647 |
} |
| 648 |
} |
| 649 |
|
| 650 |
|
| 651 |
|
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
|
| 656 |
void onPhoneAccountChanged(String callId, PhoneAccountHandle pHandle) { |
| 657 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 658 |
try { |
| 659 |
Log.d(this, "onPhoneAccountChanged %s", callId); |
| 660 |
adapter.onPhoneAccountChanged(callId, pHandle, Log.getExternalSession()); |
| 661 |
} catch (RemoteException ignored) { |
| 662 |
} |
| 663 |
} |
| 664 |
} |
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
|
| 669 |
void onConnectionServiceFocusReleased() { |
| 670 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 671 |
try { |
| 672 |
Log.d(this, "onConnectionServiceFocusReleased"); |
| 673 |
adapter.onConnectionServiceFocusReleased(Log.getExternalSession()); |
| 674 |
} catch (RemoteException ignored) { |
| 675 |
} |
| 676 |
} |
| 677 |
} |
| 678 |
|
| 679 |
|
| 680 |
|
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
|
| 686 |
|
| 687 |
void setConferenceState(String callId, boolean isConference) { |
| 688 |
Log.v(this, "setConferenceState: %s %b", callId, isConference); |
| 689 |
for (IConnectionServiceAdapter adapter : mAdapters) { |
| 690 |
try { |
| 691 |
adapter.setConferenceState(callId, isConference, Log.getExternalSession()); |
| 692 |
} catch (RemoteException ignored) { |
| 693 |
} |
| 694 |
} |
| 695 |
} |
| 696 |
|
| 697 |
|
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
|
| 704 |
void setCallDirection(String callId, @Call.Details.CallDirection int direction) { |
| 705 |
for (IConnectionServiceAdapter a : mAdapters) { |
| 706 |
try { |
| 707 |
a.setCallDirection(callId, direction, Log.getExternalSession()); |
| 708 |
} catch (RemoteException e) { |
| 709 |
} |
| 710 |
} |
| 711 |
} |
| 712 |
} |