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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user