From 2d286f4984d478cc5947a3a3ceea85b292d5f920 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Tue, 7 Aug 2012 14:43:59 -0700 Subject: MediaFile: Fix case sensitive file extension matching for computing MTP format code Bug: 6939136 Change-Id: Iefd4083aefbd4b175a2f8c860a9e13c99ded9c82 Signed-off-by: Mike Lockwood --- media/java/android/media/MediaFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media') diff --git a/media/java/android/media/MediaFile.java b/media/java/android/media/MediaFile.java index d21ada4..06d43a2 100644 --- a/media/java/android/media/MediaFile.java +++ b/media/java/android/media/MediaFile.java @@ -325,7 +325,7 @@ public class MediaFile { } int lastDot = fileName.lastIndexOf('.'); if (lastDot > 0) { - String extension = fileName.substring(lastDot + 1); + String extension = fileName.substring(lastDot + 1).toUpperCase(); Integer value = sFileTypeToFormatMap.get(extension); if (value != null) { return value.intValue(); -- cgit v1.1