Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
    
    
  
  
    
    
    
    
    class MediaDrmStateException : IllegalStateException, MediaDrmThrowable
    
    Thrown when a general failure occurs during a MediaDrm operation. Extends IllegalStateException with the addition of an error code that may be useful in diagnosing the failure. 
     Please refer to ErrorCodes for the general error handling strategy and details about each possible return value from android.media.MediaDrm.MediaDrmStateException#getErrorCode().
    Summary
    
      
        
          | Public methods | 
        
          | String | Retrieve a developer-readable diagnostic information string associated with the exception. | 
        
          | Int | Returns error code associated with this MediaDrmStateException. | 
        
          | Int |  | 
        
          | Int |  | 
        
          | Int |  | 
        
          | Boolean | Returns true if the MediaDrmStateExceptionis a transient issue, perhaps due to resource constraints, and that the operation (e.g. provisioning) may succeed on a subsequent attempt. | 
      
    
    Public methods
    
      getDiagnosticInfo
      
      fun getDiagnosticInfo(): String
      Retrieve a developer-readable diagnostic information string associated with the exception. Do not show this to end-users, since this string will not be localized or generally comprehensible to end-users.
      
        
          
            | Return | 
          
            | String | This value cannot be null. | 
        
      
     
    
      getErrorCode
      
      fun getErrorCode(): Int
      Returns error code associated with this MediaDrmStateException. 
       Please refer to ErrorCodes for the general error handling strategy and details about each possible return value.
      
        
          
            | Return | 
          
            | Int | an error code defined in MediaDrm.ErrorCodes. Value isandroid.media.MediaDrm.ErrorCodes#ERROR_NO_KEY,android.media.MediaDrm.ErrorCodes#ERROR_KEY_EXPIRED,android.media.MediaDrm.ErrorCodes#ERROR_RESOURCE_BUSY,android.media.MediaDrm.ErrorCodes#ERROR_INSUFFICIENT_OUTPUT_PROTECTION,android.media.MediaDrm.ErrorCodes#ERROR_SESSION_NOT_OPENED,android.media.MediaDrm.ErrorCodes#ERROR_UNSUPPORTED_OPERATION,android.media.MediaDrm.ErrorCodes#ERROR_INSUFFICIENT_SECURITY,android.media.MediaDrm.ErrorCodes#ERROR_FRAME_TOO_LARGE,android.media.MediaDrm.ErrorCodes#ERROR_LOST_STATE,android.media.MediaDrm.ErrorCodes#ERROR_CERTIFICATE_MALFORMED,android.media.MediaDrm.ErrorCodes#ERROR_CERTIFICATE_MISSING,android.media.MediaDrm.ErrorCodes#ERROR_CRYPTO_LIBRARY,android.media.MediaDrm.ErrorCodes#ERROR_GENERIC_OEM,android.media.MediaDrm.ErrorCodes#ERROR_GENERIC_PLUGIN,android.media.MediaDrm.ErrorCodes#ERROR_INIT_DATA,android.media.MediaDrm.ErrorCodes#ERROR_KEY_NOT_LOADED,android.media.MediaDrm.ErrorCodes#ERROR_LICENSE_PARSE,android.media.MediaDrm.ErrorCodes#ERROR_LICENSE_POLICY,android.media.MediaDrm.ErrorCodes#ERROR_LICENSE_RELEASE,android.media.MediaDrm.ErrorCodes#ERROR_LICENSE_REQUEST_REJECTED,android.media.MediaDrm.ErrorCodes#ERROR_LICENSE_RESTORE,android.media.MediaDrm.ErrorCodes#ERROR_LICENSE_STATE,android.media.MediaDrm.ErrorCodes#ERROR_MEDIA_FRAMEWORK,android.media.MediaDrm.ErrorCodes#ERROR_PROVISIONING_CERTIFICATE,android.media.MediaDrm.ErrorCodes#ERROR_PROVISIONING_CONFIG,android.media.MediaDrm.ErrorCodes#ERROR_PROVISIONING_PARSE,android.media.MediaDrm.ErrorCodes#ERROR_PROVISIONING_REQUEST_REJECTED,android.media.MediaDrm.ErrorCodes#ERROR_PROVISIONING_RETRY,android.media.MediaDrm.ErrorCodes#ERROR_SECURE_STOP_RELEASE,android.media.MediaDrm.ErrorCodes#ERROR_STORAGE_READ,android.media.MediaDrm.ErrorCodes#ERROR_STORAGE_WRITE, orandroid.media.MediaDrm.ErrorCodes#ERROR_ZERO_SUBSAMPLES | 
        
      
     
    
      getErrorContext
      
      fun getErrorContext(): Int
      
        
          
            | Return | 
          
            | Int | an opaque integer that would help the @ MediaDrmvendor locate the source of the error if available, otherwise 0. | 
        
      
     
    
      getOemError
      
      fun getOemError(): Int
      
        
          
            | Return | 
          
            | Int | an OEM or SOC specific error code if available, otherwise 0. | 
        
      
     
    
      getVendorError
      
      fun getVendorError(): Int
      
        
          
            | Return | 
          
            | Int | an error code defined by the MediaDrmplugin vendor if available, otherwise 0. | 
        
      
     
    
      isTransient
      
      fun isTransient(): Boolean
      Returns true if the MediaDrmStateException is a transient issue, perhaps due to resource constraints, and that the operation (e.g. provisioning) may succeed on a subsequent attempt.
     
  
  
  
    
  
 
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]