MC: Updated comment only
[pub/Android/ownCloud.git] / src / com / owncloud / android / utils / FileStorageUtils.java
index b0c337d..3983771 100644 (file)
@@ -1,5 +1,8 @@
-/* ownCloud Android client application
- *   Copyright (C) 2012-2013 ownCloud Inc.
+/**
+ *   ownCloud Android client application
+ *
+ *   @author David A. Velasco
+ *   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,
@@ -41,16 +44,14 @@ import android.webkit.MimeTypeMap;
 
 /**
  * Static methods to help in access to local file system.
- * 
- * @author David A. Velasco
  */
 public class FileStorageUtils {
-    public static Integer mSortOrder;
-    public static Boolean mSortAscending;
     public static final Integer SORT_NAME = 0;
     public static final Integer SORT_DATE = 1;
     public static final Integer SORT_SIZE = 2;
-  
+    public static Integer mSortOrder = SORT_NAME;
+    public static Boolean mSortAscending = true;
+
     
     //private static final String LOG_TAG = "FileStorageUtils";
 
@@ -253,7 +254,7 @@ public class FileStorageUtils {
         Collections.sort(files, new Comparator<OCFile>() {
             public int compare(OCFile o1, OCFile o2) {
                 if (o1.isFolder() && o2.isFolder()) {
-                    return val * o1.getRemotePath().toLowerCase().compareTo(o2.getRemotePath().toLowerCase());
+                    return val * new AlphanumComparator().compare(o1, o2);
                 } else if (o1.isFolder()) {
                     return -1;
                 } else if (o2.isFolder()) {