X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/b64fd4cc5b9d702f18cbc27ed650ba604d0757dd..68b9744a9c99f38d35a7b146cde4f4deceee68b7:/src/com/owncloud/android/utils/DisplayUtils.java diff --git a/src/com/owncloud/android/utils/DisplayUtils.java b/src/com/owncloud/android/utils/DisplayUtils.java index e22b6de8..905f60b2 100644 --- a/src/com/owncloud/android/utils/DisplayUtils.java +++ b/src/com/owncloud/android/utils/DisplayUtils.java @@ -1,6 +1,10 @@ -/* ownCloud Android client application +/** + * ownCloud Android client application + * + * @author Bartek Przybylski + * @author David A. Velasco * Copyright (C) 2011 Bartek Przybylski - * Copyright (C) 2012-2013 ownCloud Inc. + * Copyright (C) 2015 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -40,9 +44,6 @@ import com.owncloud.android.datamodel.OCFile; /** * A helper class for some string operations. - * - * @author Bartek Przybylski - * @author David A. Velasco */ public class DisplayUtils { @@ -52,8 +53,6 @@ public class DisplayUtils { private static final String[] sizeSuffixes = { "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" }; - private final static Double THUMBNAIL_THRESHOLD = 0.5; - private static HashMap mimeType2HUmanReadable; static { mimeType2HUmanReadable = new HashMap(); @@ -344,30 +343,4 @@ public class DisplayUtils { return path; } - /** - * - * @param mFiles - * @return true: imageView, false: listView - */ - public static boolean decideViewLayout(Vector mFiles){ - // decide image vs. file view - double countImages = 0; - double countFiles = 0; - - for (OCFile file : mFiles){ - if (!file.isFolder()){ - countFiles++; - - if (file.isImage()){ - countImages++; - } - } - } - - if ((countImages / countFiles) >= THUMBNAIL_THRESHOLD){ - return true; - } else { - return false; - } - } }