summaryrefslogtreecommitdiffstats
path: root/drm/libdrmframework/include
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/libdrmframework/include
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/libdrmframework/include')
-rw-r--r--drm/libdrmframework/include/DrmManager.h2
-rw-r--r--drm/libdrmframework/include/DrmManagerClientImpl.h3
-rw-r--r--drm/libdrmframework/include/DrmManagerService.h2
-rw-r--r--drm/libdrmframework/include/IDrmManagerService.h4
4 files changed, 6 insertions, 5 deletions
diff --git a/drm/libdrmframework/include/DrmManager.h b/drm/libdrmframework/include/DrmManager.h
index 3942efe..491e8f7 100644
--- a/drm/libdrmframework/include/DrmManager.h
+++ b/drm/libdrmframework/include/DrmManager.h
@@ -85,7 +85,7 @@ public:
status_t saveRights(int uniqueId, const DrmRights& drmRights,
const String8& rightsPath, const String8& contentPath);
- String8 getOriginalMimeType(int uniqueId, const String8& path);
+ String8 getOriginalMimeType(int uniqueId, const String8& path, int fd);
int getDrmObjectType(int uniqueId, const String8& path, const String8& mimeType);
diff --git a/drm/libdrmframework/include/DrmManagerClientImpl.h b/drm/libdrmframework/include/DrmManagerClientImpl.h
index f3d9315..9b4c9ae 100644
--- a/drm/libdrmframework/include/DrmManagerClientImpl.h
+++ b/drm/libdrmframework/include/DrmManagerClientImpl.h
@@ -148,10 +148,11 @@ public:
*
* @param[in] uniqueId Unique identifier for a session
* @param[in] path the path of the protected content
+ * @param[in] fd the file descriptor of the protected content
* @return String8
* Returns mime-type of the original content, such as "video/mpeg"
*/
- String8 getOriginalMimeType(int uniqueId, const String8& path);
+ String8 getOriginalMimeType(int uniqueId, const String8& path, int fd);
/**
* Retrieves the type of the protected object (content, rights, etc..)
diff --git a/drm/libdrmframework/include/DrmManagerService.h b/drm/libdrmframework/include/DrmManagerService.h
index 066fe4a..0dfdca6 100644
--- a/drm/libdrmframework/include/DrmManagerService.h
+++ b/drm/libdrmframework/include/DrmManagerService.h
@@ -72,7 +72,7 @@ public:
status_t saveRights(int uniqueId, const DrmRights& drmRights,
const String8& rightsPath, const String8& contentPath);
- String8 getOriginalMimeType(int uniqueId, const String8& path);
+ String8 getOriginalMimeType(int uniqueId, const String8& path, int fd);
int getDrmObjectType(int uniqueId, const String8& path, const String8& mimeType);
diff --git a/drm/libdrmframework/include/IDrmManagerService.h b/drm/libdrmframework/include/IDrmManagerService.h
index 5b89c91..5a4d70a 100644
--- a/drm/libdrmframework/include/IDrmManagerService.h
+++ b/drm/libdrmframework/include/IDrmManagerService.h
@@ -109,7 +109,7 @@ public:
virtual status_t saveRights(int uniqueId, const DrmRights& drmRights,
const String8& rightsPath, const String8& contentPath) = 0;
- virtual String8 getOriginalMimeType(int uniqueId, const String8& path) = 0;
+ virtual String8 getOriginalMimeType(int uniqueId, const String8& path, int fd) = 0;
virtual int getDrmObjectType(
int uniqueId, const String8& path, const String8& mimeType) = 0;
@@ -200,7 +200,7 @@ public:
virtual status_t saveRights(int uniqueId, const DrmRights& drmRights,
const String8& rightsPath, const String8& contentPath);
- virtual String8 getOriginalMimeType(int uniqueId, const String8& path);
+ virtual String8 getOriginalMimeType(int uniqueId, const String8& path, int fd);
virtual int getDrmObjectType(int uniqueId, const String8& path, const String8& mimeType);