public class DrmEvent
extends Object



This class was deprecated in API level 30.
Please use MediaDrm

A base class that is used to send asynchronous event information from the DRM framework.

Summary

Constants

String DRM_INFO_OBJECT

The key that is used in the attributes HashMap to pass the DrmInfo object.

String DRM_INFO_STATUS_OBJECT

The key that is used in the attributes HashMap to pass the return status.

int TYPE_ALL_RIGHTS_REMOVED

All of the rights information associated with all DRM schemes have been successfully removed.

int TYPE_DRM_INFO_PROCESSED

The given DRM information has been successfully processed.

Protected constructors

DrmEvent(int uniqueId, int type, String message)

Creates a DrmEvent object with the specified parameters.

DrmEvent(int uniqueId, int type, String message, HashMap<StringObject> attributes)

Creates a DrmEvent object with the specified parameters.

Public methods

Object getAttribute(String key)

Retrieves the attribute associated with the specified key.

String getMessage()

Retrieves the message description associated with this object.

int getType()

Retrieves the type of information that is associated with this object.

int getUniqueId()

Retrieves the unique session identifier associated with this object.

Inherited methods

From class java.lang.Object

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

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

void finalize()

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

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

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

final void notifyAll()

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

String toString()

Returns a string representation of the object.

final void wait(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 wait(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 wait()

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

Constants

DRM_INFO_OBJECT

public static final String DRM_INFO_OBJECT

The key that is used in the attributes HashMap to pass the DrmInfo object.

Constant Value: "drm_info_object"

DRM_INFO_STATUS_OBJECT

public static final String DRM_INFO_STATUS_OBJECT

The key that is used in the attributes HashMap to pass the return status.

Constant Value: "drm_info_status_object"

TYPE_ALL_RIGHTS_REMOVED

public static final int TYPE_ALL_RIGHTS_REMOVED

All of the rights information associated with all DRM schemes have been successfully removed.

Constant Value: 1001 (0x000003e9)

TYPE_DRM_INFO_PROCESSED

public static final int TYPE_DRM_INFO_PROCESSED

The given DRM information has been successfully processed.

Constant Value: 1002 (0x000003ea)

Protected constructors

DrmEvent

protected DrmEvent (int uniqueId, 
                int type, 
                String message)

Creates a DrmEvent object with the specified parameters.

Parameters
uniqueId int: Unique session identifier.
type int: Type of information.
message String: Message description.

DrmEvent

protected DrmEvent (int uniqueId, 
                int type, 
                String message, 
                HashMap<StringObject> attributes)

Creates a DrmEvent object with the specified parameters.

Parameters
uniqueId int: Unique session identifier.
type int: Type of information.
message String: Message description.
attributes HashMap: Attributes for extensible information.

Public methods

getAttribute

public Object getAttribute (String key)

Retrieves the attribute associated with the specified key.

Parameters
key String
Returns
Object One of the attributes or null if no mapping for the key is found.

getMessage

public String getMessage ()

Retrieves the message description associated with this object.

Returns
String The message description.

getType

public int getType ()

Retrieves the type of information that is associated with this object.

Returns
int The type of information.

getUniqueId

public int getUniqueId ()

Retrieves the unique session identifier associated with this object.

Returns
int The unique session identifier.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025-02-10 UTC.