Fix for the incorrect size of the new added DRM file. (bug 2897238)

Change-Id: I798be5243116727abdc77850000a6a84ab204bd6
This commit is contained in:
Gloria Wang
2010-09-03 10:45:51 -07:00
parent 0e60f5304b
commit 048350abfe

View File

@@ -143,11 +143,11 @@ public final class DrmStore
DrmRawContent content = new DrmRawContent(fis, (int) fis.available(),
DrmRawContent.DRM_MIMETYPE_MESSAGE_STRING);
String mimeType = content.getContentType();
long size = fis.getChannel().size();
DrmRightsManager manager = manager = DrmRightsManager.getInstance();
DrmRights rights = manager.queryRights(content);
InputStream stream = content.getContentInputStream(rights);
long size = stream.available();
Uri contentUri = null;
if (mimeType.startsWith("audio/")) {