Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/drm/DrmErrorEvent#constants) \| [Inherited Constants](https://developer.android.com/reference/android/drm/DrmErrorEvent#inhconstants) \| [Ctors](https://developer.android.com/reference/android/drm/DrmErrorEvent#pubctors) \| [Inherited Methods](https://developer.android.com/reference/android/drm/DrmErrorEvent#inhmethods)

# DrmErrorEvent

*** ** * ** ***

` public class DrmErrorEvent `   
` ` ` extends https://developer.android.com/reference/android/drm/DrmEvent ` ` `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.drm.DrmEvent](https://developer.android.com/reference/android/drm/DrmEvent) ||
|   | ↳ | android.drm.DrmErrorEvent |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 30.**   

Please use `https://developer.android.com/reference/android/media/MediaDrm`

An entity class that is passed to the `https://developer.android.com/reference/android/drm/DrmManagerClient.OnErrorListener#onError(android.drm.DrmManagerClient,%20android.drm.DrmErrorEvent)` callback.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/drm/DrmErrorEvent#TYPE_ACQUIRE_DRM_INFO_FAILED` Failed to acquire `https://developer.android.com/reference/android/drm/DrmInfo`. |
| `int` | `https://developer.android.com/reference/android/drm/DrmErrorEvent#TYPE_NOT_SUPPORTED` Response from the server cannot be handled by the DRM plug-in (agent). |
| `int` | `https://developer.android.com/reference/android/drm/DrmErrorEvent#TYPE_NO_INTERNET_CONNECTION` An Internet connection is not available and no attempt can be made to renew rights. |
| `int` | `https://developer.android.com/reference/android/drm/DrmErrorEvent#TYPE_OUT_OF_MEMORY` Memory allocation failed during renewal. |
| `int` | `https://developer.android.com/reference/android/drm/DrmErrorEvent#TYPE_PROCESS_DRM_INFO_FAILED` Failed to process `https://developer.android.com/reference/android/drm/DrmInfo`. |
| `int` | `https://developer.android.com/reference/android/drm/DrmErrorEvent#TYPE_REMOVE_ALL_RIGHTS_FAILED` Failed to remove all the rights objects associated with all DRM schemes. |
| `int` | `https://developer.android.com/reference/android/drm/DrmErrorEvent#TYPE_RIGHTS_NOT_INSTALLED` Something went wrong installing the rights. |
| `int` | `https://developer.android.com/reference/android/drm/DrmErrorEvent#TYPE_RIGHTS_RENEWAL_NOT_ALLOWED` The server rejected the renewal of rights. |

### Inherited constants

From class `https://developer.android.com/reference/android/drm/DrmEvent` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/drm/DrmEvent#DRM_INFO_OBJECT`

The key that is used in the `attributes` HashMap to pass the `https://developer.android.com/reference/android/drm/DrmInfo` object.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/drm/DrmEvent#DRM_INFO_STATUS_OBJECT`

The key that is used in the `attributes` HashMap to pass the return status.
`int` `https://developer.android.com/reference/android/drm/DrmEvent#TYPE_ALL_RIGHTS_REMOVED`

All of the rights information associated with all DRM schemes have been successfully removed.
`int` `https://developer.android.com/reference/android/drm/DrmEvent#TYPE_DRM_INFO_PROCESSED`

The given DRM information has been successfully processed.

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/drm/DrmErrorEvent#DrmErrorEvent(int,%20int,%20java.lang.String)(int uniqueId, int type, https://developer.android.com/reference/java/lang/String message) ` Creates a `DrmErrorEvent` object with the specified parameters. |
| ` https://developer.android.com/reference/android/drm/DrmErrorEvent#DrmErrorEvent(int,%20int,%20java.lang.String,%20java.util.HashMap<java.lang.String,java.lang.Object>)(int uniqueId, int type, https://developer.android.com/reference/java/lang/String message, https://developer.android.com/reference/java/util/HashMap<https://developer.android.com/reference/java/lang/String, https://developer.android.com/reference/java/lang/Object> attributes) ` Creates a `DrmErrorEvent` object with the specified parameters. |

### Inherited methods

From class ` https://developer.android.com/reference/android/drm/DrmEvent ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/android/drm/DrmEvent#getAttribute(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Retrieves the attribute associated with the specified key.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/drm/DrmEvent#getMessage()() `

Retrieves the message description associated with this object.
` int` ` https://developer.android.com/reference/android/drm/DrmEvent#getType()() `

Retrieves the type of information that is associated with this object.
` int` ` https://developer.android.com/reference/android/drm/DrmEvent#getUniqueId()() `

Retrieves the unique session identifier associated with this object.
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*.

## Constants

### TYPE_ACQUIRE_DRM_INFO_FAILED

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

```
public static final int TYPE_ACQUIRE_DRM_INFO_FAILED
```

Failed to acquire `https://developer.android.com/reference/android/drm/DrmInfo`. This error event is sent when an `https://developer.android.com/reference/android/drm/DrmManagerClient#acquireDrmInfo(android.drm.DrmInfoRequest)` call fails.

<br />

Constant Value: 2008 (0x000007d8)

### TYPE_NOT_SUPPORTED

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

```
public static final int TYPE_NOT_SUPPORTED
```

Response from the server cannot be handled by the DRM plug-in (agent).

<br />

Constant Value: 2003 (0x000007d3)

### TYPE_NO_INTERNET_CONNECTION

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

```
public static final int TYPE_NO_INTERNET_CONNECTION
```

An Internet connection is not available and no attempt can be made to renew rights.

<br />

Constant Value: 2005 (0x000007d5)

### TYPE_OUT_OF_MEMORY

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

```
public static final int TYPE_OUT_OF_MEMORY
```

Memory allocation failed during renewal. Can in the future perhaps be used to trigger garbage collector.

<br />

Constant Value: 2004 (0x000007d4)

### TYPE_PROCESS_DRM_INFO_FAILED

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

```
public static final int TYPE_PROCESS_DRM_INFO_FAILED
```

Failed to process `https://developer.android.com/reference/android/drm/DrmInfo`. This error event is sent when a `https://developer.android.com/reference/android/drm/DrmManagerClient#processDrmInfo(android.drm.DrmInfo)` call fails.

<br />

Constant Value: 2006 (0x000007d6)

### TYPE_REMOVE_ALL_RIGHTS_FAILED

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

```
public static final int TYPE_REMOVE_ALL_RIGHTS_FAILED
```

Failed to remove all the rights objects associated with all DRM schemes.

<br />

Constant Value: 2007 (0x000007d7)

### TYPE_RIGHTS_NOT_INSTALLED

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

```
public static final int TYPE_RIGHTS_NOT_INSTALLED
```

Something went wrong installing the rights.

<br />

Constant Value: 2001 (0x000007d1)

### TYPE_RIGHTS_RENEWAL_NOT_ALLOWED

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

```
public static final int TYPE_RIGHTS_RENEWAL_NOT_ALLOWED
```

The server rejected the renewal of rights.

<br />

Constant Value: 2002 (0x000007d2)

## Public constructors

### DrmErrorEvent

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

```
public DrmErrorEvent (int uniqueId, 
                int type, 
                String message)
```

Creates a `DrmErrorEvent` object with the specified parameters.

<br />

| Parameters ||
|---|---|
| `uniqueId` | `int`: Unique session identifier. <br /> |
| `type` | `int`: Type of the event. Must be any of the event types defined above. <br /> |
| `message` | `String`: Message description. It can be null. <br /> |

### DrmErrorEvent

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

```
public DrmErrorEvent (int uniqueId, 
                int type, 
                String message, 
                HashMap<String, Object> attributes)
```

Creates a `DrmErrorEvent` object with the specified parameters.

<br />

| Parameters ||
|---|---|
| `uniqueId` | `int`: Unique session identifier. <br /> |
| `type` | `int`: Type of the event. Must be any of the event types defined above. <br /> |
| `message` | `String`: Message description. <br /> |
| `attributes` | `HashMap`: Attributes for extensible information. Could be any information provided by the plug-in. It can be null. <br /> |