mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 21:59:47 +03:00
spotbugs: remove unused paramter and add null-check where needed
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
0dad4840f1
commit
c7a8062f00
2 changed files with 8 additions and 13 deletions
|
@ -380,7 +380,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
|
||||
accountSetupWebviewBinding.loginWebview.loadUrl(url, headers);
|
||||
|
||||
setClient(accountSetupWebviewBinding.loginWebviewProgressBar);
|
||||
setClient();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -397,7 +397,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
private void setClient(ProgressBar progressBar) {
|
||||
private void setClient() {
|
||||
accountSetupWebviewBinding.loginWebview.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
|
||||
|
@ -743,7 +743,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
|
||||
private void checkOcServer() {
|
||||
String uri;
|
||||
if (accountSetupBinding != null && !accountSetupBinding.hostUrlInput.getText().toString().isEmpty()) {
|
||||
if (accountSetupBinding != null && accountSetupBinding.hostUrlInput.getText()!= null &&
|
||||
!accountSetupBinding.hostUrlInput.getText().toString().isEmpty()) {
|
||||
uri = accountSetupBinding.hostUrlInput.getText().toString().trim();
|
||||
} else {
|
||||
uri = mServerInfo.mBaseUrl;
|
||||
|
@ -936,7 +937,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
|
||||
case OK_NO_SSL:
|
||||
case OK:
|
||||
if (accountSetupBinding.hostUrlInput
|
||||
if (accountSetupBinding.hostUrlInput.getText() != null &&
|
||||
accountSetupBinding.hostUrlInput
|
||||
.getText()
|
||||
.toString()
|
||||
.trim()
|
||||
|
@ -1039,7 +1041,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
case OK_NO_SSL:
|
||||
case OK:
|
||||
if (showWebViewLoginUrl) {
|
||||
if (accountSetupBinding.hostUrlInput
|
||||
if (accountSetupBinding.hostUrlInput.getText() != null &&
|
||||
accountSetupBinding.hostUrlInput
|
||||
.getText()
|
||||
.toString()
|
||||
.trim()
|
||||
|
@ -1467,13 +1470,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* For retrieving the clicking on authentication cancel button.
|
||||
*/
|
||||
public void doNegativeAuthenticationDialogClick() {
|
||||
mIsFirstAuthAttempt = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
package com.owncloud.android.ui.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.DownloadManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
|
Loading…
Reference in a new issue