summaryrefslogtreecommitdiffstats
path: root/drm/drmserver
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2012-07-30 17:57:39 -0700
committerJames Dong <jdong@google.com>2012-08-10 17:38:19 -0700
commitbf5b3b29e31b293313788d7464cfb258ac0da803 (patch)
tree1e3e016a1f7268688be59047be835a17609977f8 /drm/drmserver
parentb3e12a4d15a329821979bf287c49a9630486e23f (diff)
downloadframeworks_av-bf5b3b29e31b293313788d7464cfb258ac0da803.zip
frameworks_av-bf5b3b29e31b293313788d7464cfb258ac0da803.tar.gz
frameworks_av-bf5b3b29e31b293313788d7464cfb258ac0da803.tar.bz2
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
Diffstat (limited to 'drm/drmserver')
-rw-r--r--drm/drmserver/DrmManager.cpp4
-rw-r--r--drm/drmserver/DrmManagerService.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/drm/drmserver/DrmManager.cpp b/drm/drmserver/DrmManager.cpp
index 737edab..e7b0e90 100644
--- a/drm/drmserver/DrmManager.cpp
+++ b/drm/drmserver/DrmManager.cpp
@@ -266,12 +266,12 @@ status_t DrmManager::saveRights(int uniqueId, const DrmRights& drmRights,
return result;
}
-String8 DrmManager::getOriginalMimeType(int uniqueId, const String8& path) {
+String8 DrmManager::getOriginalMimeType(int uniqueId, const String8& path, int fd) {
Mutex::Autolock _l(mLock);
const String8 plugInId = getSupportedPlugInIdFromPath(uniqueId, path);
if (EMPTY_STRING != plugInId) {
IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInId);
- return rDrmEngine.getOriginalMimeType(uniqueId, path);
+ return rDrmEngine.getOriginalMimeType(uniqueId, path, fd);
}
return EMPTY_STRING;
}
diff --git a/drm/drmserver/DrmManagerService.cpp b/drm/drmserver/DrmManagerService.cpp
index 25a4e7b..bbd3b7f 100644
--- a/drm/drmserver/DrmManagerService.cpp
+++ b/drm/drmserver/DrmManagerService.cpp
@@ -125,9 +125,9 @@ status_t DrmManagerService::saveRights(
return mDrmManager->saveRights(uniqueId, drmRights, rightsPath, contentPath);
}
-String8 DrmManagerService::getOriginalMimeType(int uniqueId, const String8& path) {
+String8 DrmManagerService::getOriginalMimeType(int uniqueId, const String8& path, int fd) {
ALOGV("Entering getOriginalMimeType");
- return mDrmManager->getOriginalMimeType(uniqueId, path);
+ return mDrmManager->getOriginalMimeType(uniqueId, path, fd);
}
int DrmManagerService::getDrmObjectType(