Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/telecom/DisconnectCause#constants) \| [Inherited Constants](https://developer.android.com/reference/android/telecom/DisconnectCause#inhconstants) \| [Fields](https://developer.android.com/reference/android/telecom/DisconnectCause#lfields) \| [Ctors](https://developer.android.com/reference/android/telecom/DisconnectCause#pubctors) \| [Methods](https://developer.android.com/reference/android/telecom/DisconnectCause#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telecom/DisconnectCause#inhmethods)

# DisconnectCause

*** ** * ** ***


`
public

final

class
DisconnectCause
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.telecom.DisconnectCause |

<br />

*** ** * ** ***

Describes the cause of a disconnected call. This always includes a code describing the generic
cause of the disconnect. Optionally, it may include a label and/or description to display to the
user. It is the responsibility of the `https://developer.android.com/reference/android/telecom/ConnectionService` to provide localized versions of
the label and description. It also may contain a reason for the disconnect, which is intended for
logging and not for display to the user.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#ANSWERED_ELSEWHERE` Disconnected because the user did not locally answer the incoming call, but it was answered on another device where the call was ringing. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#BUSY` Disconnected because the other party was busy. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#CALL_PULLED` Disconnected because the call was pulled from the current device to another device. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#CANCELED` Disconnected because it has been canceled. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#CONNECTION_MANAGER_NOT_SUPPORTED` Disconnected because the connection manager did not support the call. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#ERROR` Disconnected because there was an error, such as a problem with the network. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#LOCAL` Disconnected because of a local user-initiated action, such as hanging up. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#MISSED` Disconnected because there was no response to an incoming call. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#OTHER` Disconnected for reason not described by other disconnect codes. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/DisconnectCause#REASON_EMERGENCY_CALL_PLACED` This reason is set when a call is ended in order to place an emergency call when a `https://developer.android.com/reference/android/telecom/PhoneAccount` doesn't support holding an ongoing call to place an emergency call. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/DisconnectCause#REASON_EMULATING_SINGLE_CALL` Reason code (returned via `https://developer.android.com/reference/android/telecom/DisconnectCause#getReason()`), which indicates that the connection service is setting the call's state to `https://developer.android.com/reference/android/telecom/Call#STATE_DISCONNECTED` because it is internally changing the representation of an IMS conference call to simulate a single-party call. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/DisconnectCause#REASON_IMS_ACCESS_BLOCKED` Reason code (returned via `https://developer.android.com/reference/android/telecom/DisconnectCause#getReason()`), which indicates that the call was disconnected because IMS access is blocked. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/DisconnectCause#REASON_UNWANTED` Reason code (returned via `https://developer.android.com/reference/android/telecom/DisconnectCause#getReason()`), which indicates that the call was disconnected because it was marked as unwanted. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/DisconnectCause#REASON_WIFI_ON_BUT_WFC_OFF` Reason code (returned via `https://developer.android.com/reference/android/telecom/DisconnectCause#getReason()`) which indicates that a call could not be completed because the cellular radio is off or out of service, the device is connected to a wifi network, but the user has not enabled wifi calling. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#REJECTED` Disconnected because the user rejected an incoming call. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#REMOTE` Disconnected because the remote party hung up an ongoing call, or because an outgoing call was not answered by the remote party. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#RESTRICTED` Disconnected because of a restriction on placing the call, such as dialing in airplane mode. |
| `int` | `https://developer.android.com/reference/android/telecom/DisconnectCause#UNKNOWN` Disconnected because of an unknown or unspecified reason. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that
the Parcelable object's flattened representation includes a file descriptor.


`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written
is a return value, that is the result of a function such as
"`Parcelable someFunction()`",
"`void someFunction(out Parcelable)`", or
"`void someFunction(inout Parcelable)`".


| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/telecom/DisconnectCause>` | `https://developer.android.com/reference/android/telecom/DisconnectCause#CREATOR` |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/telecom/DisconnectCause#DisconnectCause(int)(int code) ` Creates a new DisconnectCause. |
| ` https://developer.android.com/reference/android/telecom/DisconnectCause#DisconnectCause(int,%20java.lang.CharSequence,%20java.lang.CharSequence,%20java.lang.String)(int code, https://developer.android.com/reference/java/lang/CharSequence label, https://developer.android.com/reference/java/lang/CharSequence description, https://developer.android.com/reference/java/lang/String reason) ` Creates a new DisconnectCause. |
| ` https://developer.android.com/reference/android/telecom/DisconnectCause#DisconnectCause(int,%20java.lang.CharSequence,%20java.lang.CharSequence,%20java.lang.String,%20int)(int code, https://developer.android.com/reference/java/lang/CharSequence label, https://developer.android.com/reference/java/lang/CharSequence description, https://developer.android.com/reference/java/lang/String reason, int toneToPlay) ` Creates a new DisconnectCause. |
| ` https://developer.android.com/reference/android/telecom/DisconnectCause#DisconnectCause(int,%20java.lang.String)(int code, https://developer.android.com/reference/java/lang/String reason) ` Creates a new DisconnectCause. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/telecom/DisconnectCause#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` boolean` | ` https://developer.android.com/reference/android/telecom/DisconnectCause#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) ` Indicates whether some other object is "equal to" this one. |
| ` int` | ` https://developer.android.com/reference/android/telecom/DisconnectCause#getCode()() ` Returns the code for the reason for this disconnect. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/telecom/DisconnectCause#getDescription()() ` Returns a description which explains the reason for the disconnect cause and is for display in the user interface. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/telecom/DisconnectCause#getLabel()() ` Returns a short label which explains the reason for the disconnect cause and is for display in the user interface. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telecom/DisconnectCause#getReason()() ` Returns an explanation of the reason for the disconnect. |
| ` int` | ` https://developer.android.com/reference/android/telecom/DisconnectCause#getTone()() ` Returns the tone to play when disconnected. |
| ` int` | ` https://developer.android.com/reference/android/telecom/DisconnectCause#hashCode()() ` Returns a hash code value for the object. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telecom/DisconnectCause#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/telecom/DisconnectCause#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel destination, int flags) ` Flatten this object in to a Parcel. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


From interface `

https://developer.android.com/reference/android/os/Parcelable

` `
abstract


int` `
https://developer.android.com/reference/android/os/Parcelable#describeContents()()
`

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.


`
abstract


void` `
https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags)
`

Flatten this object in to a Parcel.


## Constants

### ANSWERED_ELSEWHERE

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ANSWERED_ELSEWHERE
```

Disconnected because the user did not locally answer the incoming call, but it was answered
on another device where the call was ringing.

<br />

Constant Value:

11
(0x0000000b)


### BUSY

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int BUSY
```

Disconnected because the other party was busy.

<br />

Constant Value:

7
(0x00000007)


### CALL_PULLED

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CALL_PULLED
```

Disconnected because the call was pulled from the current device to another device.

<br />

Constant Value:

12
(0x0000000c)


### CANCELED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CANCELED
```

Disconnected because it has been canceled.

<br />

Constant Value:

4
(0x00000004)


### CONNECTION_MANAGER_NOT_SUPPORTED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CONNECTION_MANAGER_NOT_SUPPORTED
```

Disconnected because the connection manager did not support the call. The call will be tried
again without a connection manager. See `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_CONNECTION_MANAGER`.

<br />

Constant Value:

10
(0x0000000a)


### ERROR

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR
```

Disconnected because there was an error, such as a problem with the network.

<br />

Constant Value:

1
(0x00000001)


### LOCAL

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LOCAL
```

Disconnected because of a local user-initiated action, such as hanging up.

<br />

Constant Value:

2
(0x00000002)


### MISSED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int MISSED
```

Disconnected because there was no response to an incoming call.

<br />

Constant Value:

5
(0x00000005)


### OTHER

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int OTHER
```

Disconnected for reason not described by other disconnect codes.

<br />

Constant Value:

9
(0x00000009)


### REASON_EMERGENCY_CALL_PLACED

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String REASON_EMERGENCY_CALL_PLACED
```

This reason is set when a call is ended in order to place an emergency call when a
`https://developer.android.com/reference/android/telecom/PhoneAccount` doesn't support holding an ongoing call to place an emergency call. This
reason string should only be associated with the `https://developer.android.com/reference/android/telecom/DisconnectCause#LOCAL` disconnect code returned from
`https://developer.android.com/reference/android/telecom/DisconnectCause#getCode()`.

<br />

Constant Value:

"REASON_EMERGENCY_CALL_PLACED"


### REASON_EMULATING_SINGLE_CALL

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String REASON_EMULATING_SINGLE_CALL
```

Reason code (returned via `https://developer.android.com/reference/android/telecom/DisconnectCause#getReason()`), which indicates that the connection service
is setting the call's state to `https://developer.android.com/reference/android/telecom/Call#STATE_DISCONNECTED` because it is internally
changing the representation of an IMS conference call to simulate a single-party call.

This reason code is only used for communication between a `https://developer.android.com/reference/android/telecom/ConnectionService` and
Telecom and should not be surfaced to the user.

<br />

Constant Value:

"EMULATING_SINGLE_CALL"


### REASON_IMS_ACCESS_BLOCKED

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String REASON_IMS_ACCESS_BLOCKED
```

Reason code (returned via `https://developer.android.com/reference/android/telecom/DisconnectCause#getReason()`), which indicates that the call was
disconnected because IMS access is blocked.

<br />

Constant Value:

"REASON_IMS_ACCESS_BLOCKED"


### REASON_UNWANTED

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final String REASON_UNWANTED
```

Reason code (returned via `https://developer.android.com/reference/android/telecom/DisconnectCause#getReason()`), which indicates that the call was
disconnected because it was marked as unwanted.

<br />

Constant Value:

"REASON_UNWANTED"


### REASON_WIFI_ON_BUT_WFC_OFF

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String REASON_WIFI_ON_BUT_WFC_OFF
```

Reason code (returned via `https://developer.android.com/reference/android/telecom/DisconnectCause#getReason()`) which indicates that a call could not be
completed because the cellular radio is off or out of service, the device is connected to
a wifi network, but the user has not enabled wifi calling.

<br />

Constant Value:

"REASON_WIFI_ON_BUT_WFC_OFF"


### REJECTED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int REJECTED
```

Disconnected because the user rejected an incoming call.

<br />

Constant Value:

6
(0x00000006)


### REMOTE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int REMOTE
```

Disconnected because the remote party hung up an ongoing call, or because an outgoing call
was not answered by the remote party.

<br />

Constant Value:

3
(0x00000003)


### RESTRICTED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RESTRICTED
```

Disconnected because of a restriction on placing the call, such as dialing in airplane
mode.

<br />

Constant Value:

8
(0x00000008)


### UNKNOWN

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UNKNOWN
```

Disconnected because of an unknown or unspecified reason.

<br />

Constant Value:

0
(0x00000000)


## Fields

### CREATOR

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<DisconnectCause> CREATOR
```

<br />

<br />

## Public constructors

### DisconnectCause

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisconnectCause (int code)
```

Creates a new DisconnectCause.

<br />

| Parameters ||
|---|---|
| `code` | `int`: The code for the disconnect cause. Value is one of the following: - `https://developer.android.com/reference/android/telecom/DisconnectCause#UNKNOWN` - `https://developer.android.com/reference/android/telecom/DisconnectCause#ERROR` - `https://developer.android.com/reference/android/telecom/DisconnectCause#LOCAL` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REMOTE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CANCELED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#MISSED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REJECTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#BUSY` - `https://developer.android.com/reference/android/telecom/DisconnectCause#RESTRICTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#OTHER` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CONNECTION_MANAGER_NOT_SUPPORTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#ANSWERED_ELSEWHERE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CALL_PULLED` |

### DisconnectCause

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisconnectCause (int code, 
                CharSequence label, 
                CharSequence description, 
                String reason)
```

Creates a new DisconnectCause.

<br />

| Parameters ||
|---|---|
| `code` | `int`: The code for the disconnect cause. Value is one of the following: - `https://developer.android.com/reference/android/telecom/DisconnectCause#UNKNOWN` - `https://developer.android.com/reference/android/telecom/DisconnectCause#ERROR` - `https://developer.android.com/reference/android/telecom/DisconnectCause#LOCAL` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REMOTE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CANCELED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#MISSED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REJECTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#BUSY` - `https://developer.android.com/reference/android/telecom/DisconnectCause#RESTRICTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#OTHER` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CONNECTION_MANAGER_NOT_SUPPORTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#ANSWERED_ELSEWHERE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CALL_PULLED` |
| `label` | `CharSequence`: The localized label to show to the user to explain the disconnect. <br /> |
| `description` | `CharSequence`: The localized description to show to the user to explain the disconnect. <br /> |
| `reason` | `String`: The reason for the disconnect. <br /> |

### DisconnectCause

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisconnectCause (int code, 
                CharSequence label, 
                CharSequence description, 
                String reason, 
                int toneToPlay)
```

Creates a new DisconnectCause.

<br />

| Parameters ||
|---|---|
| `code` | `int`: The code for the disconnect cause. Value is one of the following: - `https://developer.android.com/reference/android/telecom/DisconnectCause#UNKNOWN` - `https://developer.android.com/reference/android/telecom/DisconnectCause#ERROR` - `https://developer.android.com/reference/android/telecom/DisconnectCause#LOCAL` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REMOTE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CANCELED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#MISSED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REJECTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#BUSY` - `https://developer.android.com/reference/android/telecom/DisconnectCause#RESTRICTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#OTHER` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CONNECTION_MANAGER_NOT_SUPPORTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#ANSWERED_ELSEWHERE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CALL_PULLED` |
| `label` | `CharSequence`: The localized label to show to the user to explain the disconnect. <br /> |
| `description` | `CharSequence`: The localized description to show to the user to explain the disconnect. <br /> |
| `reason` | `String`: The reason for the disconnect. <br /> |
| `toneToPlay` | `int`: The tone to play on disconnect, as defined in `https://developer.android.com/reference/android/media/ToneGenerator`. <br /> |

### DisconnectCause

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisconnectCause (int code, 
                String reason)
```

Creates a new DisconnectCause.

<br />

| Parameters ||
|---|---|
| `code` | `int`: The code for the disconnect cause. Value is one of the following: - `https://developer.android.com/reference/android/telecom/DisconnectCause#UNKNOWN` - `https://developer.android.com/reference/android/telecom/DisconnectCause#ERROR` - `https://developer.android.com/reference/android/telecom/DisconnectCause#LOCAL` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REMOTE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CANCELED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#MISSED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REJECTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#BUSY` - `https://developer.android.com/reference/android/telecom/DisconnectCause#RESTRICTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#OTHER` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CONNECTION_MANAGER_NOT_SUPPORTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#ANSWERED_ELSEWHERE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CALL_PULLED` |
| `reason` | `String`: The reason for the disconnect. <br /> |

## Public methods

### describeContents

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### equals

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object o)
```

Indicates whether some other object is "equal to" this one.


The `equals` method implements an equivalence relation
on non-null object references:

- It is *reflexive*: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.


An equivalence relation partitions the elements it operates on
into *equivalence classes*; all the members of an
equivalence class are equal to each other. Members of an
equivalence class are substitutable for each other, at least
for some purposes.

<br />

| Parameters ||
|---|---|
| `o` | `Object`: the reference object with which to compare. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getCode

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCode ()
```

Returns the code for the reason for this disconnect.

<br />

| Returns ||
|---|---|
| `int` | The disconnect code. Value is one of the following: - `https://developer.android.com/reference/android/telecom/DisconnectCause#UNKNOWN` - `https://developer.android.com/reference/android/telecom/DisconnectCause#ERROR` - `https://developer.android.com/reference/android/telecom/DisconnectCause#LOCAL` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REMOTE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CANCELED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#MISSED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REJECTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#BUSY` - `https://developer.android.com/reference/android/telecom/DisconnectCause#RESTRICTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#OTHER` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CONNECTION_MANAGER_NOT_SUPPORTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#ANSWERED_ELSEWHERE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#CALL_PULLED` |

### getDescription

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getDescription ()
```

Returns a description which explains the reason for the disconnect cause and is for display
in the user interface. This optional text is generally a longer and more descriptive version
of `https://developer.android.com/reference/android/telecom/DisconnectCause#getLabel()`, however it can exist even if `https://developer.android.com/reference/android/telecom/DisconnectCause#getLabel()` is empty. The In-Call UI
should display this relatively prominently; the traditional implementation displays this as
an alert dialog. The `https://developer.android.com/reference/android/telecom/ConnectionService` is responsible for providing and localizing
this message. If there is no string provided, returns null.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The disconnect description. <br /> |

### getLabel

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getLabel ()
```

Returns a short label which explains the reason for the disconnect cause and is for display
in the user interface. If not null, it is expected that the In-Call UI should display this
text where it would normally display the call state ("Dialing", "Disconnected") and is
therefore expected to be relatively small. The `https://developer.android.com/reference/android/telecom/ConnectionService` is responsible for
providing and localizing this label. If there is no string provided, returns null.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The disconnect label. <br /> |

### getReason

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getReason ()
```

Returns an explanation of the reason for the disconnect. This is not intended for display to
the user and is used mainly for logging.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The disconnect reason. <br /> |

### getTone

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTone ()
```

Returns the tone to play when disconnected.

<br />

| Returns ||
|---|---|
| `int` | the tone as defined in `https://developer.android.com/reference/android/media/ToneGenerator` to play when disconnected. <br /> |

### hashCode

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
`https://developer.android.com/reference/java/util/HashMap`.


The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### toString

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel destination, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `destination` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |