|
@@ -75,6 +75,7 @@ import java.util.ArrayList;
|
|
|
import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Locale;
|
|
|
+import java.util.Set;
|
|
|
import java.util.Vector;
|
|
|
|
|
|
/**
|
|
@@ -92,7 +93,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
|
private boolean mHideItemOptions;
|
|
|
private boolean gridView;
|
|
|
private boolean multiSelect;
|
|
|
- private HashSet<OCFile> checkedFiles;
|
|
|
+ private Set<OCFile> checkedFiles;
|
|
|
|
|
|
private FileDataStorageManager mStorageManager;
|
|
|
private Account mAccount;
|
|
@@ -106,7 +107,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
|
private static final int VIEWTYPE_ITEM = 1;
|
|
|
private static final int VIEWTYPE_IMAGE = 2;
|
|
|
|
|
|
- private ArrayList<ThumbnailsCacheManager.ThumbnailGenerationTask> asyncTasks = new ArrayList<>();
|
|
|
+ private List<ThumbnailsCacheManager.ThumbnailGenerationTask> asyncTasks = new ArrayList<>();
|
|
|
|
|
|
public OCFileListAdapter(Context context, ComponentsGetter transferServiceGetter,
|
|
|
OCFileListFragmentInterface ocFileListFragmentInterface, boolean argHideItemOptions,
|
|
@@ -532,7 +533,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void setData(ArrayList<Object> objects, ExtendedListFragment.SearchType searchType,
|
|
|
+ public void setData(List<Object> objects, ExtendedListFragment.SearchType searchType,
|
|
|
FileDataStorageManager storageManager, OCFile folder) {
|
|
|
if (storageManager != null && mStorageManager == null) {
|
|
|
mStorageManager = storageManager;
|
|
@@ -569,7 +570,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- private void parseShares(ArrayList<Object> objects) {
|
|
|
+ private void parseShares(List<Object> objects) {
|
|
|
List<OCShare> shares = new ArrayList<>();
|
|
|
|
|
|
for (Object shareObject : objects) {
|
|
@@ -608,7 +609,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
|
mStorageManager.saveShares(shares);
|
|
|
}
|
|
|
|
|
|
- private void parseVirtuals(ArrayList<Object> objects, ExtendedListFragment.SearchType searchType) {
|
|
|
+ private void parseVirtuals(List<Object> objects, ExtendedListFragment.SearchType searchType) {
|
|
|
VirtualFolderType type;
|
|
|
boolean onlyImages = false;
|
|
|
switch (searchType) {
|
|
@@ -666,7 +667,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
|
* @param files Collection of files to filter
|
|
|
* @return Folders in the input
|
|
|
*/
|
|
|
- public List<OCFile> getFolders(ArrayList<OCFile> files) {
|
|
|
+ public List<OCFile> getFolders(List<OCFile> files) {
|
|
|
List<OCFile> ret = new ArrayList<>();
|
|
|
|
|
|
for (OCFile file : files) {
|
|
@@ -685,11 +686,11 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
|
notifyDataSetChanged();
|
|
|
}
|
|
|
|
|
|
- public HashSet<OCFile> getCheckedItems() {
|
|
|
+ public Set<OCFile> getCheckedItems() {
|
|
|
return checkedFiles;
|
|
|
}
|
|
|
|
|
|
- public void setCheckedItem(HashSet<OCFile> files) {
|
|
|
+ public void setCheckedItem(Set<OCFile> files) {
|
|
|
checkedFiles.clear();
|
|
|
checkedFiles.addAll(files);
|
|
|
}
|