DrmInfoEventpublic class DrmInfoEvent extends DrmEvent An entity class that is passed to the
{@link DrmManagerClient.OnInfoListener#onInfo onInfo()} callback. |
Fields Summary |
---|
public static final int | TYPE_ALREADY_REGISTERED_BY_ANOTHER_ACCOUNTThe registration has already been done by another account ID. | public static final int | TYPE_REMOVE_RIGHTSThe rights need to be removed completely. | public static final int | TYPE_RIGHTS_INSTALLEDThe rights have been successfully downloaded and installed. | public static final int | TYPE_WAIT_FOR_RIGHTSThe rights object is being delivered to the device. You must wait before
calling {@link DrmManagerClient#acquireRights acquireRights()} again. | public static final int | TYPE_ACCOUNT_ALREADY_REGISTEREDThe registration has already been done for the given account. | public static final int | TYPE_RIGHTS_REMOVEDThe rights have been removed. |
Constructors Summary |
---|
public DrmInfoEvent(int uniqueId, int type, String message)Creates a DrmInfoEvent object with the specified parameters.
// Add more type constants here...
// FIXME:
// We may want to add a user-defined type constant, such as
// TYPE_VENDOR_SPECIFIC, to take care vendor specific use
// cases.
super(uniqueId, type, message);
checkTypeValidity(type);
| public DrmInfoEvent(int uniqueId, int type, String message, HashMap attributes)Creates a DrmInfoEvent object with the specified parameters.
super(uniqueId, type, message, attributes);
checkTypeValidity(type);
|
Methods Summary |
---|
private void | checkTypeValidity(int type)
if (type < TYPE_ALREADY_REGISTERED_BY_ANOTHER_ACCOUNT ||
type > TYPE_RIGHTS_REMOVED) {
if (type != TYPE_ALL_RIGHTS_REMOVED &&
type != TYPE_DRM_INFO_PROCESSED) {
final String msg = "Unsupported type: " + type;
throw new IllegalArgumentException(msg);
}
}
|
|