X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/f440d30e427389effe68000c4af78a1e20316519..52bd01bcedf1b8f13c49b67ee40a848bae1a9d40:/src/com/owncloud/android/DisplayUtils.java diff --git a/src/com/owncloud/android/DisplayUtils.java b/src/com/owncloud/android/DisplayUtils.java index d6188113..d2939c87 100644 --- a/src/com/owncloud/android/DisplayUtils.java +++ b/src/com/owncloud/android/DisplayUtils.java @@ -1,11 +1,10 @@ /* ownCloud Android client application * Copyright (C) 2011 Bartek Przybylski - * Copyright (2) 2012-2013 ownCloud Inc. + * Copyright (C) 2012-2013 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -25,8 +24,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Set; -import android.util.Log; - /** * A helper class for some string operations. * @@ -59,7 +56,7 @@ public class DisplayUtils { private static final String TYPE_APPLICATION = "application"; private static final String TYPE_AUDIO = "audio"; private static final String TYPE_IMAGE = "image"; - private static final String TYPE_TXT = "txt"; + private static final String TYPE_TXT = "text"; private static final String TYPE_VIDEO = "video"; private static final String SUBTYPE_PDF = "pdf"; @@ -145,7 +142,7 @@ public class DisplayUtils { } else { String [] parts = mimetype.split("/"); String type = parts[0]; - String subtype = parts[1]; + String subtype = (parts.length > 1) ? parts[1] : ""; if(TYPE_TXT.equals(type)) { return R.drawable.file_doc;