diff --git a/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java index 0b730e4d94..a556603310 100644 --- a/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -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); diff --git a/src/main/java/com/owncloud/android/ui/activity/EditorWebView.java b/src/main/java/com/owncloud/android/ui/activity/EditorWebView.java index 13958e1706..b56cfbdd20 100644 --- a/src/main/java/com/owncloud/android/ui/activity/EditorWebView.java +++ b/src/main/java/com/owncloud/android/ui/activity/EditorWebView.java @@ -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;