X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/17776812eef33657e94549c36a751066af81b4be..fe1b334ce6b23d495f10ba0240ab3892793fa0bc:/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 120fbde1..07c9d537 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -414,15 +414,15 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity private void checkOcServer() { String uri = mHostUrlInput.getText().toString().trim(); + mServerCheckedAndValid = false; + mOkButton.setEnabled(false); + mDiscoveredVersion = null; if (uri.length() != 0) { - mServerCheckedAndValid = false; - mOkButton.setEnabled(false); mServerStatusText = R.string.auth_testing_connection; mServerStatusIcon = R.drawable.progress_small; showServerStatus(); mOcServerChkOperation = new OwnCloudServerCheckOperation(uri, this); WebdavClient client = OwnCloudClientUtils.createOwnCloudClient(Uri.parse(uri), this); - mDiscoveredVersion = null; mOperationThread = mOcServerChkOperation.execute(client, this, mHandler); } else { mHostUrlInput.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0); @@ -1010,11 +1010,11 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity * to the interactions with the OAuth authorization server. */ private void showAuthStatus() { - if (mServerStatusIcon == 0 && mServerStatusText == 0) { + if (mAuthStatusIcon == 0 && mAuthStatusText == 0) { mAuthStatusLayout.setVisibility(View.INVISIBLE); } else { - mAuthStatusLayout.setText(mServerStatusText); - mAuthStatusLayout.setCompoundDrawablesWithIntrinsicBounds(mServerStatusIcon, 0, 0, 0); + mAuthStatusLayout.setText(mAuthStatusText); + mAuthStatusLayout.setCompoundDrawablesWithIntrinsicBounds(mAuthStatusIcon, 0, 0, 0); mAuthStatusLayout.setVisibility(View.VISIBLE); } } @@ -1028,7 +1028,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity * @param view Refresh 'button' */ public void onRefreshClick(View view) { - onFocusChange(mHostUrlInput, false); + checkOcServer(); }