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 List<ThumbnailsCacheManager.ThumbnailGenerationTask> asyncTasks = new ArrayList<>();
private boolean onlyOnDevice = false;
private boolean onlyOnDevice;
public OCFileListAdapter(Context context, ComponentsGetter transferServiceGetter,
OCFileListFragmentInterface ocFileListFragmentInterface, boolean argHideItemOptions,
@ -188,14 +188,16 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
}
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)) {
mFiles.get(i).setEncrypted(encrypted);
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)) {
mFilesAll.get(i).setEncrypted(encrypted);
break;

View file

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

View file

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