DrmUtilspublic 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 void | cleanupStorage(android.content.Context context)
SqliteWrapper.delete(context, context.getContentResolver(),
DRM_TEMP_URI, null, null);
| public static android.net.Uri | insert(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);
}
}
}
|
|