diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-10-25 16:30:54 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-10-25 16:30:54 -0700 |
commit | 96c620595bd0585f934b0971b4552c57845e9a78 (patch) | |
tree | e523cdadefc3ac8730cc9a80f11c5e8fcddf2dc1 /packages/ExternalStorageProvider/src/com | |
parent | c802a6614095660bccfd0cdf4f15404ad1863b76 (diff) | |
download | frameworks_base-96c620595bd0585f934b0971b4552c57845e9a78.zip frameworks_base-96c620595bd0585f934b0971b4552c57845e9a78.tar.gz frameworks_base-96c620595bd0585f934b0971b4552c57845e9a78.tar.bz2 |
Extra to always show advanced devices.
Also always lower-case extension to extract MIME type correctly,
we may want to fix in MimeUtils at some point.
Bug: 11354402
Change-Id: I77d0c06a663cd0c4320c41553ff1980b6f9a7778
Diffstat (limited to 'packages/ExternalStorageProvider/src/com')
-rw-r--r-- | packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java index d42354f..65e3eee 100644 --- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java +++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java @@ -394,7 +394,7 @@ public class ExternalStorageProvider extends DocumentsProvider { private static String getTypeForName(String name) { final int lastDot = name.lastIndexOf('.'); if (lastDot >= 0) { - final String extension = name.substring(lastDot + 1); + final String extension = name.substring(lastDot + 1).toLowerCase(); final String mime = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); if (mime != null) { return mime; @@ -411,7 +411,7 @@ public class ExternalStorageProvider extends DocumentsProvider { private static String removeExtension(String mimeType, String name) { final int lastDot = name.lastIndexOf('.'); if (lastDot >= 0) { - final String extension = name.substring(lastDot + 1); + final String extension = name.substring(lastDot + 1).toLowerCase(); final String nameMime = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); if (mimeType.equals(nameMime)) { return name.substring(0, lastDot); |