Merge pull request #3152 from nextcloud/codacy

Fixing further codacy issues
This commit is contained in:
Andy Scherzinger 2018-10-19 07:49:43 +02:00 committed by GitHub
commit 6d8c7af90c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View file

@ -108,7 +108,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
private static final int VIEWTYPE_IMAGE = 2; private static final int VIEWTYPE_IMAGE = 2;
private List<ThumbnailsCacheManager.ThumbnailGenerationTask> asyncTasks = new ArrayList<>(); private List<ThumbnailsCacheManager.ThumbnailGenerationTask> asyncTasks = new ArrayList<>();
private boolean onlyOnDevice = false; private boolean onlyOnDevice;
public OCFileListAdapter(Context context, ComponentsGetter transferServiceGetter, public OCFileListAdapter(Context context, ComponentsGetter transferServiceGetter,
OCFileListFragmentInterface ocFileListFragmentInterface, boolean argHideItemOptions, OCFileListFragmentInterface ocFileListFragmentInterface, boolean argHideItemOptions,
@ -188,14 +188,16 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
} }
public void setEncryptionAttributeForItemID(String fileId, boolean encrypted) { public void setEncryptionAttributeForItemID(String fileId, boolean encrypted) {
for (int i = 0; i < mFiles.size(); i++) { int filesSize = mFiles.size();
for (int i = 0; i < filesSize; i++) {
if (mFiles.get(i).getRemoteId().equals(fileId)) { if (mFiles.get(i).getRemoteId().equals(fileId)) {
mFiles.get(i).setEncrypted(encrypted); mFiles.get(i).setEncrypted(encrypted);
break; break;
} }
} }
for (int i = 0; i < mFilesAll.size(); i++) { filesSize = mFilesAll.size();
for (int i = 0; i < filesSize; i++) {
if (mFilesAll.get(i).getRemoteId().equals(fileId)) { if (mFilesAll.get(i).getRemoteId().equals(fileId)) {
mFilesAll.get(i).setEncrypted(encrypted); mFilesAll.get(i).setEncrypted(encrypted);
break; break;

View file

@ -70,7 +70,6 @@ public class UserListAdapter extends RecyclerView.Adapter<UserListAdapter.UserVi
private int accentColor; private int accentColor;
private List<OCShare> shares; private List<OCShare> shares;
private float avatarRadiusDimension; private float avatarRadiusDimension;
private Account account;
private OCFile file; private OCFile file;
public UserListAdapter(FragmentManager fragmentManager, Context context, List<OCShare> shares, Account account, public UserListAdapter(FragmentManager fragmentManager, Context context, List<OCShare> shares, Account account,
@ -79,7 +78,6 @@ public class UserListAdapter extends RecyclerView.Adapter<UserListAdapter.UserVi
this.fragmentManager = fragmentManager; this.fragmentManager = fragmentManager;
this.shares = shares; this.shares = shares;
this.listener = listener; this.listener = listener;
this.account = account;
this.file = file; this.file = file;
accentColor = ThemeUtils.primaryAccentColor(context); accentColor = ThemeUtils.primaryAccentColor(context);

View file

@ -308,9 +308,9 @@ public class EditShareFragment extends Fragment {
} }
} else { } else {
for (int i = 0; i < sSubordinateCheckBoxIds.length; i++) { for (int sSubordinateCheckBoxId : sSubordinateCheckBoxIds) {
//noinspection ConstantConditions, prevented in the method beginning //noinspection ConstantConditions, prevented in the method beginning
subordinate = getView().findViewById(sSubordinateCheckBoxIds[i]); subordinate = getView().findViewById(sSubordinateCheckBoxId);
subordinate.setVisibility(View.GONE); subordinate.setVisibility(View.GONE);
if (subordinate.isChecked()) { if (subordinate.isChecked()) {
toggleDisablingListener(subordinate); toggleDisablingListener(subordinate);