Skip to content

Commit 2d286f4

Browse files
author
Mike Lockwood
committed
MediaFile: Fix case sensitive file extension matching for computing MTP format code
Bug: 6939136 Change-Id: Iefd4083aefbd4b175a2f8c860a9e13c99ded9c82 Signed-off-by: Mike Lockwood <lockwood@google.com>
1 parent d932de9 commit 2d286f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

media/java/android/media/MediaFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public static int getFormatCode(String fileName, String mimeType) {
325325
}
326326
int lastDot = fileName.lastIndexOf('.');
327327
if (lastDot > 0) {
328-
String extension = fileName.substring(lastDot + 1);
328+
String extension = fileName.substring(lastDot + 1).toUpperCase();
329329
Integer value = sFileTypeToFormatMap.get(extension);
330330
if (value != null) {
331331
return value.intValue();

0 commit comments

Comments
 (0)