Explorar o código

REALLY fix ArrayOutOfBoundsException when chosing icons for files with invalid MIME type

David A. Velasco %!s(int64=12) %!d(string=hai) anos
pai
achega
3ac08177eb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/com/owncloud/android/DisplayUtils.java

+ 1 - 1
src/com/owncloud/android/DisplayUtils.java

@@ -145,7 +145,7 @@ public class DisplayUtils {
         } else {
             String [] parts = mimetype.split("/");
             String type = parts[0];
-            String subtype = (parts.length > 0) ? parts[1] : "";
+            String subtype = (parts.length > 1) ? parts[1] : "";
             
             if(TYPE_TXT.equals(type)) {
                 return R.drawable.file_doc;