Language

ErrorCode Enum

Definition

Identifies legacy DRM session-exception errors, including resource contention.

public enum ErrorCode
type ErrorCode = 
Inheritance
ErrorCode

Fields

Name Value Description
Unknown 0

The corresponding Java constant denotes an unknown session error. It was marked unused and deprecated in API level 31.

Android reference for android.media.MediaDrm.SessionException.ERROR_UNKNOWN.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

ResourceContention 1

The corresponding Java constant was deprecated in API level 31. On API level 31 and later, use IsTransient instead of comparing ErrorCode against this value.

This indicates that apps using MediaDrm sessions are temporarily exceeding the capacity of available crypto resources. The app should retry the operation later.

Android reference for android.media.MediaDrm.SessionException.ERROR_RESOURCE_CONTENTION.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Remarks

Resource contention indicates temporary pressure on cryptographic resources. Prefer the exception's transient-error query over comparing this legacy code; the native unknown code is marked unused.

Applies to