FileDocCategorySizeDatePackage
DrmEvent.javaAPI DocAndroid 5.1 API3768Thu Mar 12 22:22:30 GMT 2015android.drm

DrmEvent

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

Fields Summary
public static final int
TYPE_ALL_RIGHTS_REMOVED
All of the rights information associated with all DRM schemes have been successfully removed.
public static final int
TYPE_DRM_INFO_PROCESSED
The given DRM information has been successfully processed.
public static final String
DRM_INFO_STATUS_OBJECT
The key that is used in the attributes HashMap to pass the return status.
public static final String
DRM_INFO_OBJECT
The key that is used in the attributes HashMap to pass the {@link DrmInfo} object.
private final int
mUniqueId
private final int
mType
private String
mMessage
private HashMap
mAttributes
Constructors Summary
protected DrmEvent(int uniqueId, int type, String message, HashMap attributes)
Creates a DrmEvent object with the specified parameters.

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


                                     
          
                               
        mUniqueId = uniqueId;
        mType = type;

        if (null != message) {
            mMessage = message;
        }

        if (null != attributes) {
            mAttributes = attributes;
        }
    
protected DrmEvent(int uniqueId, int type, String message)
Creates a DrmEvent object with the specified parameters.

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

        mUniqueId = uniqueId;
        mType = type;

        if (null != message) {
            mMessage = message;
        }
    
Methods Summary
public java.lang.ObjectgetAttribute(java.lang.String key)
Retrieves the attribute associated with the specified key.

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

        return mAttributes.get(key);
    
public java.lang.StringgetMessage()
Retrieves the message description associated with this object.

return
The message description.

        return mMessage;
    
public intgetType()
Retrieves the type of information that is associated with this object.

return
The type of information.

        return mType;
    
public intgetUniqueId()
Retrieves the unique session identifier associated with this object.

return
The unique session identifier.

        return mUniqueId;