X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/d612f37de46ac4f88d7b205a999213f3497398ee..5dc43aab3cc1243f9989dd6a0c7dd3350c3f709b:/src/com/owncloud/android/authentication/AuthenticatorActivity.java diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index e4839707..3c34be61 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -935,7 +935,33 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList finish(); - } else { + } else if (result.isServerFail() || result.isException()) { + /// if server fail or exception in authorization, the UI is updated as when a server check failed + mServerIsChecked = true; + mServerIsValid = false; + mIsSslConn = false; + mOcServerChkOperation = null; + mDiscoveredVersion = null; + mHostBaseUrl = normalizeUrl(mHostUrlInput.getText().toString()); + + // update status icon and text + updateServerStatusIconAndText(result); + showServerStatus(); + mAuthStatusIcon = 0; + mAuthStatusText = 0; + showAuthStatus(); + + // update input controls state + showRefreshButton(); + mOkButton.setEnabled(false); + + // very special case (TODO: move to a common place for all the remote operations) (dangerous here?) + if (result.getCode() == ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED) { + mLastSslUntrustedServerResult = result; + showDialog(DIALOG_SSL_VALIDATOR); + } + + } else { // authorization fail due to client side - probably wrong credentials updateAuthStatusIconAndText(result); showAuthStatus(); Log_OC.d(TAG, "Access failed: " + result.getLogMessage());