Example usage for android.media UnsupportedSchemeException toString

List of usage examples for android.media UnsupportedSchemeException toString

Introduction

In this page you can find the example usage for android.media UnsupportedSchemeException toString.

Prototype

public String toString() 

Source Link

Document

Returns a short description of this throwable.

Usage

From source file:org.chromium.media.MediaDrmBridge.java

/**
 * Create a new MediaDrmBridge from the crypto scheme UUID.
 *
 * @param schemeUUID Crypto scheme UUID.
 * @param securityLevel Security level to be used.
 * @param nativeMediaDrmBridge Native object of this class.
 *///  w w  w .  j  ava2 s .c  o  m
@CalledByNative
private static MediaDrmBridge create(byte[] schemeUUID, String securityLevel, int nativeMediaDrmBridge) {
    UUID cryptoScheme = getUUIDFromBytes(schemeUUID);
    if (cryptoScheme == null || !MediaDrm.isCryptoSchemeSupported(cryptoScheme)) {
        return null;
    }

    MediaDrmBridge media_drm_bridge = null;
    try {
        media_drm_bridge = new MediaDrmBridge(cryptoScheme, securityLevel, nativeMediaDrmBridge);
    } catch (android.media.UnsupportedSchemeException e) {
        Log.e(TAG, "Unsupported DRM scheme: " + e.toString());
    } catch (java.lang.IllegalArgumentException e) {
        Log.e(TAG, "Failed to create MediaDrmBridge: " + e.toString());
    } catch (java.lang.IllegalStateException e) {
        Log.e(TAG, "Failed to create MediaDrmBridge: " + e.toString());
    }

    return media_drm_bridge;
}