public static boolean isDrmMimeType(Context context,String mimetype){
  boolean result=false;
  if (context != null) {
    try {
      DrmManagerClient drmClient=new DrmManagerClient(context);
      if (drmClient != null && mimetype != null && mimetype.length() > 0) {
        result=drmClient.canHandle("",mimetype);
      }
    }
 catch (    IllegalArgumentException e) {
      Log.w(TAG,"DrmManagerClient instance could not be created, context is Illegal.");
    }
catch (    IllegalStateException e) {
      Log.w(TAG,"DrmManagerClient didn't initialize properly.");
    }
  }
  return result;
}

public static boolean isDrmMimeType ( Context context , String mimetype ) { boolean result = false ; if ( context != null ) { try { DrmManagerClient drmClient = new DrmManagerClient ( context ) ; if ( drmClient != null && mimetype != null && mimetype . length ( ) > 0 ) { result = drmClient . canHandle ( "" , mimetype ) ; } } catch ( IllegalArgumentException e ) { Log . w ( TAG , "DrmManagerClient instance could not be created, context is Illegal." ) ; } catch ( IllegalStateException e ) { Log . w ( TAG , "DrmManagerClient didn't initialize properly." ) ; } } return result ; }
checks if the media type is a drm media type
