CallException


public final class CallException extends RuntimeException


This class defines exceptions that can be thrown when using androidx.core.telecom APIs.

Summary

Constants

static final int

Telecom was not able to switch the audio route to Bluetooth because the Bluetooth device is null.

static final int

The operation has failed because Telecom cannot set the requested call as the current active call.

static final int

The CallControlScope.setInactive or CallsManager.addCall#onSetInactive failed because the CallAttributesCompat.SUPPORTS_SET_INACTIVE was not set.

static final int

The operation has failed because Telecom has already removed the call from the server side and destroyed all the objects associated with it.

static final int

The operation has failed because there is either no PhoneAccount registered with Telecom for the given operation, or the limit of calls has been reached.

static final int

The operation has failed due to Telecom failing to hold the current active call for the call attempting to become the new active call.

static final int

The operation has failed because the operation failed to complete before the timeout

static final int

The operation has failed due to an unknown or unspecified error.

Public constructors

CallException(int code)

Public methods

boolean
equals(Object other)
final int
int
@NonNull String

Constants

ERROR_BLUETOOTH_DEVICE_IS_NULL

public static final int ERROR_BLUETOOTH_DEVICE_IS_NULL = 8

Telecom was not able to switch the audio route to Bluetooth because the Bluetooth device is null. The user should reconnect the Bluetooth device and retry the audio route switch.

ERROR_CALL_CANNOT_BE_SET_TO_ACTIVE

public static final int ERROR_CALL_CANNOT_BE_SET_TO_ACTIVE = 4

The operation has failed because Telecom cannot set the requested call as the current active call. The client should end the current active call and re-try the operation.

ERROR_CALL_DOES_NOT_SUPPORT_HOLD

public static final int ERROR_CALL_DOES_NOT_SUPPORT_HOLD = 7

The CallControlScope.setInactive or CallsManager.addCall#onSetInactive failed because the CallAttributesCompat.SUPPORTS_SET_INACTIVE was not set. Please re-add the call with the CallAttributesCompat.SUPPORTS_SET_INACTIVE if the call should be able to hold.

ERROR_CALL_IS_NOT_BEING_TRACKED

public static final int ERROR_CALL_IS_NOT_BEING_TRACKED = 3

The operation has failed because Telecom has already removed the call from the server side and destroyed all the objects associated with it. The client should re-add the call.

ERROR_CALL_NOT_PERMITTED_AT_PRESENT_TIME

public static final int ERROR_CALL_NOT_PERMITTED_AT_PRESENT_TIME = 5

The operation has failed because there is either no PhoneAccount registered with Telecom for the given operation, or the limit of calls has been reached. The client should end the current active call and re-try the failed operation.

ERROR_CANNOT_HOLD_CURRENT_ACTIVE_CALL

public static final int ERROR_CANNOT_HOLD_CURRENT_ACTIVE_CALL = 2

The operation has failed due to Telecom failing to hold the current active call for the call attempting to become the new active call. The client should end the current active call and re-try the failed operation.

ERROR_OPERATION_TIMED_OUT

public static final int ERROR_OPERATION_TIMED_OUT = 6

The operation has failed because the operation failed to complete before the timeout

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN = 1

The operation has failed due to an unknown or unspecified error.

Public constructors

CallException

Added in 1.0.0-alpha03
public CallException(int code)

Public methods

equals

public boolean equals(Object other)

getCode

Added in 1.0.0-alpha03
public final int getCode()

hashCode

public int hashCode()

toString

public @NonNull String toString()