DrmErrorEventpublic class DrmErrorEvent extends DrmEvent An entity class that is passed to the
{@link DrmManagerClient.OnErrorListener#onError onError()} callback. |
Fields Summary |
---|
public static final int | TYPE_RIGHTS_NOT_INSTALLEDSomething went wrong installing the rights. | public static final int | TYPE_RIGHTS_RENEWAL_NOT_ALLOWEDThe server rejected the renewal of rights. | public static final int | TYPE_NOT_SUPPORTEDResponse from the server cannot be handled by the DRM plug-in (agent). | public static final int | TYPE_OUT_OF_MEMORYMemory allocation failed during renewal. Can in the future perhaps be used to trigger
garbage collector. | public static final int | TYPE_NO_INTERNET_CONNECTIONAn Internet connection is not available and no attempt can be made to renew rights. | public static final int | TYPE_PROCESS_DRM_INFO_FAILEDFailed to process {@link DrmInfo}. This error event is sent when a
{@link DrmManagerClient#processDrmInfo processDrmInfo()} call fails. | public static final int | TYPE_REMOVE_ALL_RIGHTS_FAILEDFailed to remove all the rights objects associated with all DRM schemes. | public static final int | TYPE_ACQUIRE_DRM_INFO_FAILEDFailed to acquire {@link DrmInfo}. This error event is sent when an
{@link DrmManagerClient#acquireDrmInfo acquireDrmInfo()} call fails. |
Constructors Summary |
---|
public DrmErrorEvent(int uniqueId, int type, String message)Creates a DrmErrorEvent 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_FAILED, to take care vendor specific use
// cases.
super(uniqueId, type, message);
checkTypeValidity(type);
| public DrmErrorEvent(int uniqueId, int type, String message, HashMap attributes)Creates a DrmErrorEvent object with the specified parameters.
super(uniqueId, type, message, attributes);
checkTypeValidity(type);
|
Methods Summary |
---|
private void | checkTypeValidity(int type)
if (type < TYPE_RIGHTS_NOT_INSTALLED ||
type > TYPE_ACQUIRE_DRM_INFO_FAILED) {
final String msg = "Unsupported type: " + type;
throw new IllegalArgumentException(msg);
}
|
|