FileDocCategorySizeDatePackage
DrmUtils.javaAPI DocAndroid 1.5 API2089Wed May 06 22:42:46 BST 2009com.android.mms.drm

DrmUtils

public class DrmUtils extends Object

Fields Summary
private static final String
TAG
private static final android.net.Uri
DRM_TEMP_URI
Constructors Summary
private DrmUtils()


      
    
Methods Summary
public static voidcleanupStorage(android.content.Context context)

        SqliteWrapper.delete(context, context.getContentResolver(),
                DRM_TEMP_URI, null, null);
    
public static android.net.Uriinsert(android.content.Context context, DrmWrapper drmObj)

        ContentResolver cr = context.getContentResolver();
        Uri uri = SqliteWrapper.insert(context, cr, DRM_TEMP_URI,
                                       new ContentValues(0));
        OutputStream os = null;
        try {
            os = cr.openOutputStream(uri);
            byte[] data = drmObj.getDecryptedData();
            if (data != null) {
                os.write(data);
            }
            return uri;
        } finally {
            if (os != null) {
                try {
                    os.close();
                } catch (IOException e) {
                    Log.e(TAG, e.getMessage(), e);
                }
            }
        }