Example usage for android.media MediaDrm PROPERTY_DEVICE_UNIQUE_ID

List of usage examples for android.media MediaDrm PROPERTY_DEVICE_UNIQUE_ID

Introduction

In this page you can find the example usage for android.media MediaDrm PROPERTY_DEVICE_UNIQUE_ID.

Prototype

String PROPERTY_DEVICE_UNIQUE_ID

To view the source code for android.media MediaDrm PROPERTY_DEVICE_UNIQUE_ID.

Click Source Link

Document

Byte array property name: the device unique identifier is established during device provisioning and provides a means of uniquely identifying each device.

Usage

From source file:at.amartinz.hardware.drm.BaseDrmInfo.java

private MediaDrm setup() {
    MediaDrm drm;/*from   w ww  .  ja  v a  2s  .c o  m*/
    try {
        drm = new MediaDrm(getUuid());
    } catch (UnsupportedSchemeException use) {
        drm = null;
    }

    if (drm == null) {
        return null;
    }

    vendor = getProperty(drm, MediaDrm.PROPERTY_VENDOR);
    version = getProperty(drm, MediaDrm.PROPERTY_VERSION);
    description = getProperty(drm, MediaDrm.PROPERTY_DESCRIPTION);

    systemId = getProperty(drm, "systemId");
    deviceId = getProperty(drm, MediaDrm.PROPERTY_DEVICE_UNIQUE_ID);

    algorithms = getProperty(drm, MediaDrm.PROPERTY_ALGORITHMS);
    algorithms = splitList(algorithms);

    securityLevel = getProperty(drm, "securityLevel");
    hdcpLevel = getProperty(drm, "hdcpLevel");
    hdcpLevelMax = getProperty(drm, "maxHdcpLevel");

    isUsageReportingSupported = getBooleanProperty(drm, "usageReportingSupport");

    sessionNumberMax = getProperty(drm, "maxNumberOfSessions");
    sessionNumberOpen = getProperty(drm, "numberOfOpenSessions");

    return drm;
}