浏览代码

fix codacy

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 7 年之前
父节点
当前提交
b67e606519

+ 1 - 1
src/main/java/com/owncloud/android/ui/EmptyRecyclerView.java

@@ -74,7 +74,7 @@ public class EmptyRecyclerView extends RecyclerView {
         }
     }
 
-    final AdapterDataObserver observer = new AdapterDataObserver() {
+    private final AdapterDataObserver observer = new AdapterDataObserver() {
         @Override
         public void onChanged() {
             super.onChanged();

+ 1 - 1
src/main/java/com/owncloud/android/ui/adapter/SyncedFolderAdapter.java

@@ -152,7 +152,7 @@ public class SyncedFolderAdapter extends SectionedRecyclerViewAdapter<SyncedFold
 
     @Override
     public void onBindFooterViewHolder(MainViewHolder holder, int section) {
-
+        // not needed
     }
 
 

+ 5 - 9
src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java

@@ -98,7 +98,7 @@ public class UploadListAdapter extends SectionedRecyclerViewAdapter<SectionedVie
 
     @Override
     public void onBindFooterViewHolder(SectionedViewHolder holder, int section) {
-
+        // not needed
     }
 
     public UploadListAdapter(FileActivity parentActivity) {
@@ -226,11 +226,7 @@ public class UploadListAdapter extends SectionedRecyclerViewAdapter<SectionedVie
                 itemViewHolder.progressBar.invalidate();
                 break;
 
-            case UPLOAD_FAILED:
-                itemViewHolder.date.setVisibility(View.GONE);
-                break;
-
-            case UPLOAD_SUCCEEDED:
+            default:
                 itemViewHolder.status.setVisibility(View.GONE);
                 break;
         }
@@ -604,7 +600,7 @@ public class UploadListAdapter extends SectionedRecyclerViewAdapter<SectionedVie
             items = new OCUpload[0];
         }
 
-        String getGroupName() {
+        private String getGroupName() {
             return name;
         }
 
@@ -620,11 +616,11 @@ public class UploadListAdapter extends SectionedRecyclerViewAdapter<SectionedVie
             this.items = items;
         }
 
-        int getGroupItemCount() {
+        private int getGroupItemCount() {
             return items == null ? 0 : items.length;
         }
 
-        Comparator<OCUpload> comparator = new Comparator<OCUpload>() {
+        public Comparator<OCUpload> comparator = new Comparator<OCUpload>() {
             @Override
             public int compare(OCUpload upload1, OCUpload upload2) {
                 if (upload1 == null) {

+ 1 - 3
src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java

@@ -544,11 +544,9 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
      * Also listens to changes in navigation drawer to hide and recover multiple selection when it's opened
      * and closed.
      */
-    private class MultiChoiceModeListener
-            implements AbsListView.MultiChoiceModeListener, DrawerLayout.DrawerListener {
+    private class MultiChoiceModeListener implements AbsListView.MultiChoiceModeListener, DrawerLayout.DrawerListener {
 
         private static final String KEY_ACTION_MODE_CLOSED_BY_DRAWER = "KILLED_ACTION_MODE";
-        private static final String KEY_SELECTION_WHEN_CLOSED_BY_DRAWER = "CHECKED_ITEMS";
 
         /**
          * True when action mode is finished because the drawer was opened