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