diff options
author | James Dong <jdong@google.com> | 2012-07-30 17:57:39 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2012-08-10 17:38:19 -0700 |
commit | bf5b3b29e31b293313788d7464cfb258ac0da803 (patch) | |
tree | 1e3e016a1f7268688be59047be835a17609977f8 /drm/libdrmframework/plugins/common/include/DrmEngineBase.h | |
parent | b3e12a4d15a329821979bf287c49a9630486e23f (diff) | |
download | frameworks_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/plugins/common/include/DrmEngineBase.h')
-rw-r--r-- | drm/libdrmframework/plugins/common/include/DrmEngineBase.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h index 6cebb97..fa51c13 100644 --- a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h +++ b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h @@ -53,7 +53,7 @@ public: DrmInfo* acquireDrmInfo(int uniqueId, const DrmInfoRequest* drmInfoRequest); - 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); @@ -222,10 +222,11 @@ protected: * * @param[in] uniqueId Unique identifier for a session * @param[in] path Path of the protected content + * @param[in] fd descriptor of the protected content as a file source * @return String8 * Returns mime-type of the original content, such as "video/mpeg" */ - virtual String8 onGetOriginalMimeType(int uniqueId, const String8& path) = 0; + virtual String8 onGetOriginalMimeType(int uniqueId, const String8& path, int fd) = 0; /** * Retrieves the type of the protected object (content, rights, etc..) |