Code example for DrmManagerClient

0
     
    //for drm 
    private static DrmManagerClient mDrmClient;
    public static DrmManagerClient getDrmManager(Context context) {
        if (mDrmClient == null) {
            mDrmClient = new DrmManagerClient(context);
        } 
        return mDrmClient;
    } 
     
    public static boolean isSupportDrm() { 
        boolean support = com.mediatek.featureoption.FeatureOption.MTK_DRM_APP;
        MtkLog.w(TAG, "isSupportDrm() return " + support);
        return support;
    } 
     
    public static Bitmap overlayDrmIcon(Context context, String path, int action, Bitmap bkg) {
        Bitmap bitmap = getDrmManager(context).overlayDrmIcon(context.getResources(), path, action, bkg);
        if (LOG) MtkLog.v(TAG, "overlayDrmIcon(" + path + ") return " + path);
        //saveBitmap("overlayDrmIconSkew() ", path, bitmap); 
        return bitmap;