Avoid use of queues to delay recursion
[pub/Android/ownCloud.git] / src / eu / alefzero / owncloud / ui / fragment / FileDetailFragment.java
index 533809f..505ff6c 100644 (file)
@@ -280,7 +280,7 @@ public class FileDetailFragment extends SherlockFragment implements
                             try {\r
                                 Intent i = new Intent(Intent.ACTION_VIEW);\r
                                 mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(storagePath.substring(storagePath.lastIndexOf('.') + 1));\r
-                                if (mimeType != mFile.getMimetype()) {\r
+                                if (mimeType != null && !mimeType.equals(mFile.getMimetype())) {\r
                                     i.setDataAndType(Uri.parse("file://"+mFile.getStoragePath()), mimeType);\r
                                     i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\r
                                     startActivity(i);\r