List of usage examples for android.drm DrmManagerClient release
@Deprecated public void release()
From source file:Main.java
/** * Return the original MIME type of the given file, using the DRM framework * if the file is protected content./*ww w . ja v a2 s . c o m*/ */ public static String getOriginalMimeType(Context context, File file, String currentMime) { final DrmManagerClient client = new DrmManagerClient(context); try { final String rawFile = file.toString(); if (client.canHandle(rawFile, null)) { return client.getOriginalMimeType(rawFile); } else { return currentMime; } } finally { client.release(); } }