소스 검색

Fixed CRASH due to ArrayIndexOutOfBoundsException while choosing the icon for a file with a wrong MIME type (reported in Play Store)

David A. Velasco 12 년 전
부모
커밋
4b46b17fcb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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[1];
+            String subtype = (parts.length > 0) ? parts[1] : "";
             
             if(TYPE_TXT.equals(type)) {
                 return R.drawable.file_doc;