Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

CallScreeningService.CallResponse.Builder

public static class CallScreeningService.CallResponse.Builder
extends Object

java.lang.Object
   ↳ android.telecom.CallScreeningService.CallResponse.Builder


Summary

Public constructors

CallScreeningService.CallResponse.Builder()

Public methods

CallScreeningService.CallResponse build()
CallScreeningService.CallResponse.Builder setDisallowCall(boolean shouldDisallowCall)

Sets whether the incoming call should be blocked.

CallScreeningService.CallResponse.Builder setRejectCall(boolean shouldRejectCall)

Sets whether the incoming call should be disconnected as if the user had manually rejected it.

CallScreeningService.CallResponse.Builder setSkipCallLog(boolean shouldSkipCallLog)

Sets whether the incoming call should not be displayed in the call log.

CallScreeningService.CallResponse.Builder setSkipNotification(boolean shouldSkipNotification)

Sets whether a missed call notification should not be shown for the incoming call.

Inherited methods

Public constructors

CallScreeningService.CallResponse.Builder

public CallScreeningService.CallResponse.Builder ()

Public methods

setDisallowCall

Added in API level 24
public CallScreeningService.CallResponse.Builder setDisallowCall (boolean shouldDisallowCall)

Sets whether the incoming call should be blocked.

Parameters
shouldDisallowCall boolean

Returns
CallScreeningService.CallResponse.Builder

setRejectCall

Added in API level 24
public CallScreeningService.CallResponse.Builder setRejectCall (boolean shouldRejectCall)

Sets whether the incoming call should be disconnected as if the user had manually rejected it. This property should only be set to true if the call is disallowed.

Parameters
shouldRejectCall boolean

Returns
CallScreeningService.CallResponse.Builder

setSkipCallLog

Added in API level 24
public CallScreeningService.CallResponse.Builder setSkipCallLog (boolean shouldSkipCallLog)

Sets whether the incoming call should not be displayed in the call log. This property should only be set to true if the call is disallowed.

Note: Calls will still be logged with type CallLog.Calls.BLOCKED_TYPE, regardless of how this property is set.

Parameters
shouldSkipCallLog boolean

Returns
CallScreeningService.CallResponse.Builder

setSkipNotification

Added in API level 24
public CallScreeningService.CallResponse.Builder setSkipNotification (boolean shouldSkipNotification)

Sets whether a missed call notification should not be shown for the incoming call. This property should only be set to true if the call is disallowed.

Parameters
shouldSkipNotification boolean

Returns
CallScreeningService.CallResponse.Builder