Added in API level 34

CallException


class CallException : RuntimeException, Parcelable
kotlin.Any
   ↳ kotlin.Throwable
   ↳ java.lang.Exception
   ↳ java.lang.RuntimeException
   ↳ android.telecom.CallException

This class defines exceptions that can be thrown when using Telecom APIs with android.os.OutcomeReceivers. Most of these exceptions are thrown when changing a call state with CallControls or CallControlCallbacks.

Summary

Constants
static Int

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

static 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 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 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 Int

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

static Int

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

Inherited constants
Public constructors
CallException(message: String?, code: Int)

Constructor for a new CallException that has a defined error code in this class

Public methods
Int

Int

Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<CallException!>

Responsible for creating CallAttribute objects for deserialized Parcels.

Constants

CODE_CALL_CANNOT_BE_SET_TO_ACTIVE

Added in API level 34
static val CODE_CALL_CANNOT_BE_SET_TO_ACTIVE: Int

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.

Value: 4

CODE_CALL_IS_NOT_BEING_TRACKED

Added in API level 34
static val CODE_CALL_IS_NOT_BEING_TRACKED: Int

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.

Value: 3

CODE_CALL_NOT_PERMITTED_AT_PRESENT_TIME

Added in API level 34
static val CODE_CALL_NOT_PERMITTED_AT_PRESENT_TIME: 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. The client should end the current active call and re-try the failed operation.

Value: 5

CODE_CANNOT_HOLD_CURRENT_ACTIVE_CALL

Added in API level 34
static val CODE_CANNOT_HOLD_CURRENT_ACTIVE_CALL: 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. The client should end the current active call and re-try the failed operation.

Value: 2

CODE_ERROR_UNKNOWN

Added in API level 34
static val CODE_ERROR_UNKNOWN: Int

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

Value: 1

CODE_OPERATION_TIMED_OUT

Added in API level 34
static val CODE_OPERATION_TIMED_OUT: Int

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

Value: 6

Public constructors

CallException

Added in API level 34
CallException(
    message: String?,
    code: Int)

Constructor for a new CallException that has a defined error code in this class

Parameters
message String?: related to why the exception was created This value may be null.
code Int: defined above that caused this exception to be created Value is android.telecom.CallException#CODE_ERROR_UNKNOWN, android.telecom.CallException#CODE_CANNOT_HOLD_CURRENT_ACTIVE_CALL, android.telecom.CallException#CODE_CALL_IS_NOT_BEING_TRACKED, android.telecom.CallException#CODE_CALL_CANNOT_BE_SET_TO_ACTIVE, android.telecom.CallException#CODE_CALL_NOT_PERMITTED_AT_PRESENT_TIME, or android.telecom.CallException#CODE_OPERATION_TIMED_OUT

Public methods

describeContents

Added in API level 34
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

writeToParcel

Added in API level 34
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 34
static val CREATOR: Parcelable.Creator<CallException!>

Responsible for creating CallAttribute objects for deserialized Parcels.