-/* 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,
/**
* 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";
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()) {