From 7f89d09c0f4a47119834ba15789260b933123ea5 Mon Sep 17 00:00:00 2001 From: Gloria Wang Date: Wed, 2 Mar 2011 12:33:00 -0800 Subject: To support DRM files without file extension Change-Id: Ie7701048d0dbd51bf358364014a1b41c894b664c --- drm/common/DrmSupportInfo.cpp | 2 +- drm/drmserver/DrmManager.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'drm') diff --git a/drm/common/DrmSupportInfo.cpp b/drm/common/DrmSupportInfo.cpp index ffc8953..3e02093 100644 --- a/drm/common/DrmSupportInfo.cpp +++ b/drm/common/DrmSupportInfo.cpp @@ -56,7 +56,7 @@ bool DrmSupportInfo::isSupportedFileSuffix(const String8& fileType) const { for (unsigned int i = 0; i < mFileSuffixVector.size(); i++) { const String8 item = mFileSuffixVector.itemAt(i); - if (String8("") != fileType && item.find(fileType) != -1) { + if (item.find(fileType) != -1) { return true; } } diff --git a/drm/drmserver/DrmManager.cpp b/drm/drmserver/DrmManager.cpp index ef7d274..ec400b7 100644 --- a/drm/drmserver/DrmManager.cpp +++ b/drm/drmserver/DrmManager.cpp @@ -184,7 +184,10 @@ bool DrmManager::canHandle(int uniqueId, const String8& path, const String8& mim IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInId); result = rDrmEngine.canHandle(uniqueId, path); } else { - result = canHandle(uniqueId, path); + String8 extension = path.getPathExtension(); + if (String8("") != extension) { + result = canHandle(uniqueId, path); + } } } return result; -- cgit v1.1