diff options
author | Glenn Kasten <gkasten@google.com> | 2011-03-14 11:32:29 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2011-03-14 17:59:51 -0700 |
commit | 41b3d3be18b54e72a44813cbdd180aae7e77b444 (patch) | |
tree | a4ae478674f82a29aec053aec047caccbde2976a /drm/common | |
parent | 8980847d149cfca1d0564d9454c262764b6ee164 (diff) | |
download | frameworks_av-41b3d3be18b54e72a44813cbdd180aae7e77b444.zip frameworks_av-41b3d3be18b54e72a44813cbdd180aae7e77b444.tar.gz frameworks_av-41b3d3be18b54e72a44813cbdd180aae7e77b444.tar.bz2 |
Bug 4016329 do full string comparisons
Use full string comparisons instead of partial for
file extension and MIME type.
Do case-insensitive comparison of MIME type and file extensions.
Fix error in comment for String8::getPathExtension.
Remove dead code -- StringTokenizer is unused.
Change-Id: I322be6235abbdaab5f7eafa48926dbb2cf46dc29
Diffstat (limited to 'drm/common')
-rw-r--r-- | drm/common/DrmSupportInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drm/common/DrmSupportInfo.cpp b/drm/common/DrmSupportInfo.cpp index 3e02093..c0bff0e 100644 --- a/drm/common/DrmSupportInfo.cpp +++ b/drm/common/DrmSupportInfo.cpp @@ -45,7 +45,7 @@ bool DrmSupportInfo::isSupportedMimeType(const String8& mimeType) const { for (unsigned int i = 0; i < mMimeTypeVector.size(); i++) { const String8 item = mMimeTypeVector.itemAt(i); - if (String8("") != mimeType && item.find(mimeType) != -1) { + if (!strcasecmp(item.string(), mimeType.string())) { return true; } } @@ -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 (item.find(fileType) != -1) { + if (!strcasecmp(item.string(), fileType.string())) { return true; } } |