Let getOriginalMimeType() take a fd passed from drm java applications

This patch enables the drm framework to avoid opening files directly.
As a result, the drm framework no longer needs the sdcard read permision.

o related-to-bug: 6426185

Change-Id: Ib176c35ef4b1a1a405e8e954f19a7985266f2510
This commit is contained in:
James Dong
2012-07-30 17:57:39 -07:00
parent b3e12a4d15
commit bf5b3b29e3
19 changed files with 46 additions and 52 deletions

View File

@@ -147,10 +147,10 @@ status_t DrmManagerClientImpl::saveRights(int uniqueId, const DrmRights& drmRigh
}
String8 DrmManagerClientImpl::getOriginalMimeType(
int uniqueId, const String8& path) {
int uniqueId, const String8& path, int fd) {
String8 mimeType = EMPTY_STRING;
if (EMPTY_STRING != path) {
mimeType = getDrmManagerService()->getOriginalMimeType(uniqueId, path);
mimeType = getDrmManagerService()->getOriginalMimeType(uniqueId, path, fd);
}
return mimeType;
}