to top
Android APIs
public class

DrmEvent

extends Object
java.lang.Object
   ↳ android.drm.DrmEvent
Known Direct Subclasses

Class Overview

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, HashMap<StringObject> attributes)
Creates a DrmEvent object with the specified parameters.
DrmEvent(int uniqueId, int type, String message)
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.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String DRM_INFO_OBJECT

Added in API level 12

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

Constant Value: "drm_info_object"

public static final String DRM_INFO_STATUS_OBJECT

Added in API level 11

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

Constant Value: "drm_info_status_object"

public static final int TYPE_ALL_RIGHTS_REMOVED

Added in API level 11

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

Constant Value: 1001 (0x000003e9)

public static final int TYPE_DRM_INFO_PROCESSED

Added in API level 11

The given DRM information has been successfully processed.

Constant Value: 1002 (0x000003ea)

Protected Constructors

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

Added in API level 12

Creates a DrmEvent object with the specified parameters.

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

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

Added in API level 11

Creates a DrmEvent object with the specified parameters.

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

Public Methods

public Object getAttribute (String key)

Added in API level 12

Retrieves the attribute associated with the specified key.

Returns
  • One of the attributes or null if no mapping for the key is found.

public String getMessage ()

Added in API level 11

Retrieves the message description associated with this object.

Returns
  • The message description.

public int getType ()

Added in API level 11

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

Returns
  • The type of information.

public int getUniqueId ()

Added in API level 11

Retrieves the unique session identifier associated with this object.

Returns
  • The unique session identifier.