| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.telecom; |
| 18 |
|
| 19 |
import android.Manifest; |
| 20 |
import android.annotation.IntDef; |
| 21 |
import android.annotation.NonNull; |
| 22 |
import android.annotation.RequiresPermission; |
| 23 |
import android.annotation.SdkConstant; |
| 24 |
import android.annotation.SystemApi; |
| 25 |
import android.app.Service; |
| 26 |
import android.content.ComponentName; |
| 27 |
import android.content.Intent; |
| 28 |
import android.content.pm.ServiceInfo; |
| 29 |
import android.net.Uri; |
| 30 |
import android.os.Handler; |
| 31 |
import android.os.IBinder; |
| 32 |
import android.os.Looper; |
| 33 |
import android.os.Message; |
| 34 |
import android.os.Parcel; |
| 35 |
import android.os.Parcelable; |
| 36 |
import android.os.RemoteException; |
| 37 |
|
| 38 |
import com.android.internal.os.SomeArgs; |
| 39 |
import com.android.internal.telecom.ICallScreeningAdapter; |
| 40 |
import com.android.internal.telecom.ICallScreeningService; |
| 41 |
|
| 42 |
import java.lang.annotation.Retention; |
| 43 |
import java.lang.annotation.RetentionPolicy; |
| 44 |
import java.util.Objects; |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
public abstract class CallScreeningService extends Service { |
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
@SdkConstant(SdkConstant.SdkConstantType.SERVICE_ACTION) |
| 126 |
public static final String SERVICE_INTERFACE = "android.telecom.CallScreeningService"; |
| 127 |
|
| 128 |
private static final int MSG_SCREEN_CALL = 1; |
| 129 |
|
| 130 |
private final Handler mHandler = new Handler(Looper.getMainLooper()) { |
| 131 |
@Override |
| 132 |
public void handleMessage(Message msg) { |
| 133 |
switch (msg.what) { |
| 134 |
case MSG_SCREEN_CALL: |
| 135 |
SomeArgs args = (SomeArgs) msg.obj; |
| 136 |
try { |
| 137 |
mCallScreeningAdapter = (ICallScreeningAdapter) args.arg1; |
| 138 |
Call.Details callDetails = Call.Details |
| 139 |
.createFromParcelableCall((ParcelableCall) args.arg2); |
| 140 |
onScreenCall(callDetails); |
| 141 |
if (callDetails.getCallDirection() == Call.Details.DIRECTION_OUTGOING) { |
| 142 |
mCallScreeningAdapter.onScreeningResponse( |
| 143 |
callDetails.getTelecomCallId(), |
| 144 |
new ComponentName(getPackageName(), getClass().getName()), |
| 145 |
null); |
| 146 |
} |
| 147 |
} catch (RemoteException e) { |
| 148 |
Log.w(this, "Exception when screening call: " + e); |
| 149 |
} finally { |
| 150 |
args.recycle(); |
| 151 |
} |
| 152 |
break; |
| 153 |
} |
| 154 |
} |
| 155 |
}; |
| 156 |
|
| 157 |
private final class CallScreeningBinder extends ICallScreeningService.Stub { |
| 158 |
@Override |
| 159 |
public void screenCall(ICallScreeningAdapter adapter, ParcelableCall call) { |
| 160 |
Log.v(this, "screenCall"); |
| 161 |
SomeArgs args = SomeArgs.obtain(); |
| 162 |
args.arg1 = adapter; |
| 163 |
args.arg2 = call; |
| 164 |
mHandler.obtainMessage(MSG_SCREEN_CALL, args).sendToTarget(); |
| 165 |
} |
| 166 |
} |
| 167 |
|
| 168 |
private ICallScreeningAdapter mCallScreeningAdapter; |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
public static class ParcelableCallResponse implements Parcelable { |
| 175 |
private final boolean mShouldDisallowCall; |
| 176 |
private final boolean mShouldRejectCall; |
| 177 |
private final boolean mShouldSilenceCall; |
| 178 |
private final boolean mShouldSkipCallLog; |
| 179 |
private final boolean mShouldSkipNotification; |
| 180 |
private final boolean mShouldScreenCallViaAudioProcessing; |
| 181 |
|
| 182 |
private final int mCallComposerAttachmentsToShow; |
| 183 |
|
| 184 |
private ParcelableCallResponse( |
| 185 |
boolean shouldDisallowCall, |
| 186 |
boolean shouldRejectCall, |
| 187 |
boolean shouldSilenceCall, |
| 188 |
boolean shouldSkipCallLog, |
| 189 |
boolean shouldSkipNotification, |
| 190 |
boolean shouldScreenCallViaAudioProcessing, |
| 191 |
int callComposerAttachmentsToShow) { |
| 192 |
mShouldDisallowCall = shouldDisallowCall; |
| 193 |
mShouldRejectCall = shouldRejectCall; |
| 194 |
mShouldSilenceCall = shouldSilenceCall; |
| 195 |
mShouldSkipCallLog = shouldSkipCallLog; |
| 196 |
mShouldSkipNotification = shouldSkipNotification; |
| 197 |
mShouldScreenCallViaAudioProcessing = shouldScreenCallViaAudioProcessing; |
| 198 |
mCallComposerAttachmentsToShow = callComposerAttachmentsToShow; |
| 199 |
} |
| 200 |
|
| 201 |
protected ParcelableCallResponse(Parcel in) { |
| 202 |
mShouldDisallowCall = in.readBoolean(); |
| 203 |
mShouldRejectCall = in.readBoolean(); |
| 204 |
mShouldSilenceCall = in.readBoolean(); |
| 205 |
mShouldSkipCallLog = in.readBoolean(); |
| 206 |
mShouldSkipNotification = in.readBoolean(); |
| 207 |
mShouldScreenCallViaAudioProcessing = in.readBoolean(); |
| 208 |
mCallComposerAttachmentsToShow = in.readInt(); |
| 209 |
} |
| 210 |
|
| 211 |
public CallResponse toCallResponse() { |
| 212 |
return new CallResponse.Builder() |
| 213 |
.setDisallowCall(mShouldDisallowCall) |
| 214 |
.setRejectCall(mShouldRejectCall) |
| 215 |
.setSilenceCall(mShouldSilenceCall) |
| 216 |
.setSkipCallLog(mShouldSkipCallLog) |
| 217 |
.setSkipNotification(mShouldSkipNotification) |
| 218 |
.setShouldScreenCallViaAudioProcessing(mShouldScreenCallViaAudioProcessing) |
| 219 |
.setCallComposerAttachmentsToShow(mCallComposerAttachmentsToShow) |
| 220 |
.build(); |
| 221 |
} |
| 222 |
|
| 223 |
public boolean shouldDisallowCall() { |
| 224 |
return mShouldDisallowCall; |
| 225 |
} |
| 226 |
|
| 227 |
public boolean shouldRejectCall() { |
| 228 |
return mShouldRejectCall; |
| 229 |
} |
| 230 |
|
| 231 |
public boolean shouldSilenceCall() { |
| 232 |
return mShouldSilenceCall; |
| 233 |
} |
| 234 |
|
| 235 |
public boolean shouldSkipCallLog() { |
| 236 |
return mShouldSkipCallLog; |
| 237 |
} |
| 238 |
|
| 239 |
public boolean shouldSkipNotification() { |
| 240 |
return mShouldSkipNotification; |
| 241 |
} |
| 242 |
|
| 243 |
public boolean shouldScreenCallViaAudioProcessing() { |
| 244 |
return mShouldScreenCallViaAudioProcessing; |
| 245 |
} |
| 246 |
|
| 247 |
public int getCallComposerAttachmentsToShow() { |
| 248 |
return mCallComposerAttachmentsToShow; |
| 249 |
} |
| 250 |
|
| 251 |
public static final Creator<ParcelableCallResponse> CREATOR = |
| 252 |
new Creator<ParcelableCallResponse>() { |
| 253 |
@Override |
| 254 |
public ParcelableCallResponse createFromParcel(Parcel in) { |
| 255 |
return new ParcelableCallResponse(in); |
| 256 |
} |
| 257 |
|
| 258 |
@Override |
| 259 |
public ParcelableCallResponse[] newArray(int size) { |
| 260 |
return new ParcelableCallResponse[size]; |
| 261 |
} |
| 262 |
}; |
| 263 |
|
| 264 |
@Override |
| 265 |
public int describeContents() { |
| 266 |
return 0; |
| 267 |
} |
| 268 |
|
| 269 |
@Override |
| 270 |
public void writeToParcel(Parcel dest, int flags) { |
| 271 |
dest.writeBoolean(mShouldDisallowCall); |
| 272 |
dest.writeBoolean(mShouldRejectCall); |
| 273 |
dest.writeBoolean(mShouldSilenceCall); |
| 274 |
dest.writeBoolean(mShouldSkipCallLog); |
| 275 |
dest.writeBoolean(mShouldSkipNotification); |
| 276 |
dest.writeBoolean(mShouldScreenCallViaAudioProcessing); |
| 277 |
dest.writeInt(mCallComposerAttachmentsToShow); |
| 278 |
} |
| 279 |
} |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
public static class CallResponse { |
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
public static final int CALL_COMPOSER_ATTACHMENT_PICTURE = 1; |
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
public static final int CALL_COMPOSER_ATTACHMENT_LOCATION = 1 << 1; |
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
public static final int CALL_COMPOSER_ATTACHMENT_SUBJECT = 1 << 2; |
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
public static final int CALL_COMPOSER_ATTACHMENT_PRIORITY = 1 << 3; |
| 313 |
|
| 314 |
|
| 315 |
@Retention(RetentionPolicy.SOURCE) |
| 316 |
@IntDef(prefix = "CALL_COMPOSER_ATTACHMENT_", flag = true, |
| 317 |
value = { |
| 318 |
CALL_COMPOSER_ATTACHMENT_PICTURE, |
| 319 |
CALL_COMPOSER_ATTACHMENT_LOCATION, |
| 320 |
CALL_COMPOSER_ATTACHMENT_SUBJECT, |
| 321 |
CALL_COMPOSER_ATTACHMENT_PRIORITY |
| 322 |
} |
| 323 |
) |
| 324 |
public @interface CallComposerAttachmentType {} |
| 325 |
|
| 326 |
private static final int NUM_CALL_COMPOSER_ATTACHMENT_TYPES = 4; |
| 327 |
|
| 328 |
private final boolean mShouldDisallowCall; |
| 329 |
private final boolean mShouldRejectCall; |
| 330 |
private final boolean mShouldSilenceCall; |
| 331 |
private final boolean mShouldSkipCallLog; |
| 332 |
private final boolean mShouldSkipNotification; |
| 333 |
private final boolean mShouldScreenCallViaAudioProcessing; |
| 334 |
private final int mCallComposerAttachmentsToShow; |
| 335 |
|
| 336 |
private CallResponse( |
| 337 |
boolean shouldDisallowCall, |
| 338 |
boolean shouldRejectCall, |
| 339 |
boolean shouldSilenceCall, |
| 340 |
boolean shouldSkipCallLog, |
| 341 |
boolean shouldSkipNotification, |
| 342 |
boolean shouldScreenCallViaAudioProcessing, |
| 343 |
int callComposerAttachmentsToShow) { |
| 344 |
if (!shouldDisallowCall |
| 345 |
&& (shouldRejectCall || shouldSkipCallLog || shouldSkipNotification)) { |
| 346 |
throw new IllegalStateException("Invalid response state for allowed call."); |
| 347 |
} |
| 348 |
|
| 349 |
if (shouldDisallowCall && shouldScreenCallViaAudioProcessing) { |
| 350 |
throw new IllegalStateException("Invalid response state for allowed call."); |
| 351 |
} |
| 352 |
|
| 353 |
mShouldDisallowCall = shouldDisallowCall; |
| 354 |
mShouldRejectCall = shouldRejectCall; |
| 355 |
mShouldSkipCallLog = shouldSkipCallLog; |
| 356 |
mShouldSkipNotification = shouldSkipNotification; |
| 357 |
mShouldSilenceCall = shouldSilenceCall; |
| 358 |
mShouldScreenCallViaAudioProcessing = shouldScreenCallViaAudioProcessing; |
| 359 |
mCallComposerAttachmentsToShow = callComposerAttachmentsToShow; |
| 360 |
} |
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
public boolean getDisallowCall() { |
| 366 |
return mShouldDisallowCall; |
| 367 |
} |
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
public boolean getRejectCall() { |
| 374 |
return mShouldRejectCall; |
| 375 |
} |
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
public boolean getSilenceCall() { |
| 381 |
return mShouldSilenceCall; |
| 382 |
} |
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
public boolean getSkipCallLog() { |
| 388 |
return mShouldSkipCallLog; |
| 389 |
} |
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
public boolean getSkipNotification() { |
| 395 |
return mShouldSkipNotification; |
| 396 |
} |
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
public boolean getShouldScreenCallViaAudioProcessing() { |
| 404 |
return mShouldScreenCallViaAudioProcessing; |
| 405 |
} |
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
public @CallComposerAttachmentType int getCallComposerAttachmentsToShow() { |
| 411 |
return mCallComposerAttachmentsToShow; |
| 412 |
} |
| 413 |
|
| 414 |
|
| 415 |
public ParcelableCallResponse toParcelable() { |
| 416 |
return new ParcelableCallResponse( |
| 417 |
mShouldDisallowCall, |
| 418 |
mShouldRejectCall, |
| 419 |
mShouldSilenceCall, |
| 420 |
mShouldSkipCallLog, |
| 421 |
mShouldSkipNotification, |
| 422 |
mShouldScreenCallViaAudioProcessing, |
| 423 |
mCallComposerAttachmentsToShow |
| 424 |
); |
| 425 |
} |
| 426 |
|
| 427 |
@Override |
| 428 |
public boolean equals(Object o) { |
| 429 |
if (this == o) return true; |
| 430 |
if (o == null || getClass() != o.getClass()) return false; |
| 431 |
CallResponse that = (CallResponse) o; |
| 432 |
return mShouldDisallowCall == that.mShouldDisallowCall && |
| 433 |
mShouldRejectCall == that.mShouldRejectCall && |
| 434 |
mShouldSilenceCall == that.mShouldSilenceCall && |
| 435 |
mShouldSkipCallLog == that.mShouldSkipCallLog && |
| 436 |
mShouldSkipNotification == that.mShouldSkipNotification && |
| 437 |
mShouldScreenCallViaAudioProcessing |
| 438 |
== that.mShouldScreenCallViaAudioProcessing && |
| 439 |
mCallComposerAttachmentsToShow == that.mCallComposerAttachmentsToShow; |
| 440 |
} |
| 441 |
|
| 442 |
@Override |
| 443 |
public int hashCode() { |
| 444 |
return Objects.hash(mShouldDisallowCall, mShouldRejectCall, mShouldSilenceCall, |
| 445 |
mShouldSkipCallLog, mShouldSkipNotification, |
| 446 |
mShouldScreenCallViaAudioProcessing, |
| 447 |
mCallComposerAttachmentsToShow); |
| 448 |
} |
| 449 |
|
| 450 |
public static class Builder { |
| 451 |
private boolean mShouldDisallowCall; |
| 452 |
private boolean mShouldRejectCall; |
| 453 |
private boolean mShouldSilenceCall; |
| 454 |
private boolean mShouldSkipCallLog; |
| 455 |
private boolean mShouldSkipNotification; |
| 456 |
private boolean mShouldScreenCallViaAudioProcessing; |
| 457 |
private int mCallComposerAttachmentsToShow = -1; |
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
|
| 462 |
public Builder setDisallowCall(boolean shouldDisallowCall) { |
| 463 |
mShouldDisallowCall = shouldDisallowCall; |
| 464 |
return this; |
| 465 |
} |
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
public Builder setRejectCall(boolean shouldRejectCall) { |
| 472 |
mShouldRejectCall = shouldRejectCall; |
| 473 |
return this; |
| 474 |
} |
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
public @NonNull Builder setSilenceCall(boolean shouldSilenceCall) { |
| 487 |
mShouldSilenceCall = shouldSilenceCall; |
| 488 |
return this; |
| 489 |
} |
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
public Builder setSkipCallLog(boolean shouldSkipCallLog) { |
| 500 |
mShouldSkipCallLog = shouldSkipCallLog; |
| 501 |
return this; |
| 502 |
} |
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
public Builder setSkipNotification(boolean shouldSkipNotification) { |
| 509 |
mShouldSkipNotification = shouldSkipNotification; |
| 510 |
return this; |
| 511 |
} |
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
@SystemApi |
| 536 |
@RequiresPermission(Manifest.permission.CAPTURE_AUDIO_OUTPUT) |
| 537 |
public @NonNull Builder setShouldScreenCallViaAudioProcessing( |
| 538 |
boolean shouldScreenCallViaAudioProcessing) { |
| 539 |
mShouldScreenCallViaAudioProcessing = shouldScreenCallViaAudioProcessing; |
| 540 |
return this; |
| 541 |
} |
| 542 |
|
| 543 |
|
| 544 |
|
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
public @NonNull Builder setCallComposerAttachmentsToShow( |
| 559 |
@CallComposerAttachmentType int callComposerAttachmentsToShow) { |
| 560 |
|
| 561 |
|
| 562 |
if (callComposerAttachmentsToShow < 0) { |
| 563 |
return this; |
| 564 |
} |
| 565 |
|
| 566 |
if ((callComposerAttachmentsToShow |
| 567 |
& (1 << NUM_CALL_COMPOSER_ATTACHMENT_TYPES)) != 0) { |
| 568 |
throw new IllegalArgumentException("Attachment types must match the ones" |
| 569 |
+ " defined in CallResponse"); |
| 570 |
} |
| 571 |
mCallComposerAttachmentsToShow = callComposerAttachmentsToShow; |
| 572 |
return this; |
| 573 |
} |
| 574 |
|
| 575 |
public CallResponse build() { |
| 576 |
return new CallResponse( |
| 577 |
mShouldDisallowCall, |
| 578 |
mShouldRejectCall, |
| 579 |
mShouldSilenceCall, |
| 580 |
mShouldSkipCallLog, |
| 581 |
mShouldSkipNotification, |
| 582 |
mShouldScreenCallViaAudioProcessing, |
| 583 |
mCallComposerAttachmentsToShow); |
| 584 |
} |
| 585 |
} |
| 586 |
} |
| 587 |
|
| 588 |
public CallScreeningService() { |
| 589 |
} |
| 590 |
|
| 591 |
@Override |
| 592 |
public IBinder onBind(Intent intent) { |
| 593 |
Log.v(this, "onBind"); |
| 594 |
return new CallScreeningBinder(); |
| 595 |
} |
| 596 |
|
| 597 |
@Override |
| 598 |
public boolean onUnbind(Intent intent) { |
| 599 |
Log.v(this, "onUnbind"); |
| 600 |
return false; |
| 601 |
} |
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
|
| 632 |
|
| 633 |
|
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
|
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
|
| 642 |
public abstract void onScreenCall(@NonNull Call.Details callDetails); |
| 643 |
|
| 644 |
|
| 645 |
|
| 646 |
|
| 647 |
|
| 648 |
|
| 649 |
|
| 650 |
|
| 651 |
|
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
|
| 656 |
|
| 657 |
|
| 658 |
|
| 659 |
|
| 660 |
|
| 661 |
|
| 662 |
|
| 663 |
|
| 664 |
|
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
public final void respondToCall(@NonNull Call.Details callDetails, |
| 669 |
@NonNull CallResponse response) { |
| 670 |
try { |
| 671 |
mCallScreeningAdapter.onScreeningResponse( |
| 672 |
callDetails.getTelecomCallId(), |
| 673 |
new ComponentName(getPackageName(), getClass().getName()), |
| 674 |
response.toParcelable()); |
| 675 |
} catch (RemoteException e) { |
| 676 |
Log.e(this, e, "Got remote exception when returning response"); |
| 677 |
} |
| 678 |
} |
| 679 |
} |