changes due to codacy

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2018-06-08 15:24:10 +02:00 committed by AndyScherzinger
parent 25075069c9
commit 5b9c442139
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 5 additions and 9 deletions

View file

@ -1729,7 +1729,7 @@ public class FileDisplayActivity extends HookActivity
} else if (operation instanceof UnshareOperation) {
onUpdateShareInformation(result, R.string.unsharing_failed);
} else if (operation instanceof RestoreFileVersionOperation) {
onRestoreFileVersionOperationFinish((RestoreFileVersionOperation) operation, result);
onRestoreFileVersionOperationFinish(result);
}
}
@ -1793,9 +1793,7 @@ public class FileDisplayActivity extends HookActivity
}
}
private void onRestoreFileVersionOperationFinish(RestoreFileVersionOperation operation,
RemoteOperationResult result) {
private void onRestoreFileVersionOperationFinish(RemoteOperationResult result) {
if (result.isSuccess()) {
OCFile file = getFile();
@ -1816,7 +1814,6 @@ public class FileDisplayActivity extends HookActivity
Snackbar.make(getSecondFragment().getView(), R.string.file_version_restored_error,
Snackbar.LENGTH_LONG).show();
}
}
public void setMediaServiceConnection() {

View file

@ -122,7 +122,6 @@ public class FileDetailActivitiesFragment extends Fragment implements ActivityLi
private boolean restoreFileVersionSupported;
private String userId;
private FileOperationsHelper operationsHelper;
private FileDataStorageManager storageManager;
public static FileDetailActivitiesFragment newInstance(OCFile file, Account account) {
FileDetailActivitiesFragment fragment = new FileDetailActivitiesFragment();
@ -191,7 +190,7 @@ public class FileDetailActivitiesFragment extends Fragment implements ActivityLi
}
private void setupView() {
storageManager = new FileDataStorageManager(account, getActivity().getContentResolver());
FileDataStorageManager storageManager = new FileDataStorageManager(account, getActivity().getContentResolver());
operationsHelper = ((ComponentsGetter) getActivity()).getFileOperationsHelper();
OCCapability capability = storageManager.getCapability(account.name);
@ -266,8 +265,8 @@ public class FileDetailActivitiesFragment extends Fragment implements ActivityLi
ArrayList<Object> versions = null;
if (restoreFileVersionSupported) {
ReadFileVersionsOperation readFileVersionsOperation = new ReadFileVersionsOperation(file.getLocalId(),
userId);
ReadFileVersionsOperation readFileVersionsOperation = new ReadFileVersionsOperation(
file.getLocalId(), userId);
RemoteOperationResult result1 = readFileVersionsOperation.execute(ownCloudClient);