X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/2b1b98478bb75f8c9fc5390461067190c09a62ee..a6a56bae2acae4f69c421fa5b8166a3cd5ebaf9f:/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 4aa0528b..4ea7f3d0 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -159,6 +159,8 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList private View mOkButton; private String mAuthToken; + + private boolean mResumed; // Control if activity is resumed /** @@ -212,6 +214,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList } if (savedInstanceState == null) { + mResumed = false; /// connection state and info mServerStatusText = mServerStatusIcon = 0; mServerIsValid = false; @@ -237,6 +240,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList } } else { + mResumed = true; /// connection state and info mServerIsValid = savedInstanceState.getBoolean(KEY_SERVER_VALID); mServerIsChecked = savedInstanceState.getBoolean(KEY_SERVER_CHECKED); @@ -313,12 +317,20 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList } @Override - public void beforeTextChanged(CharSequence s, int start, int count, int after) {} + public void beforeTextChanged(CharSequence s, int start, int count, int after) { + } @Override - public void onTextChanged(CharSequence s, int start, int before, int count) {} - + public void onTextChanged(CharSequence s, int start, int before, int count) { + if (!mResumed) { + mAuthStatusIcon = 0; + mAuthStatusText = 0; + showAuthStatus(); + } + mResumed = false; + } }); + mPasswordInput.setOnFocusChangeListener(this); mPasswordInput.setImeOptions(EditorInfo.IME_ACTION_DONE); mPasswordInput.setOnEditorActionListener(this); @@ -728,6 +740,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList mAuthCheckOperation = new ExistenceCheckOperation("", this, false); WebdavClient client = OwnCloudClientUtils.createOwnCloudClient(Uri.parse(mHostBaseUrl + webdav_path), this, false); mOperationThread = mAuthCheckOperation.execute(client, this, mHandler); + } /** @@ -762,7 +775,8 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList // NOTHING TO DO ; can't find out what situation that leads to the exception in this code, but user logs signal that it happens } - if (result.isTemporalRedirection() || result.isIdPRedirection()) { + //if (result.isTemporalRedirection() || result.isIdPRedirection()) { + if (result.isIdPRedirection()) { String url = result.getRedirectedLocation(); String targetUrl = mHostBaseUrl + AccountUtils.getWebdavPath(mDiscoveredVersion, mAuthTokenType); @@ -770,8 +784,8 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList mSamlDialog = SamlWebViewDialog.newInstance(url, targetUrl); mSamlDialog.show(getSupportFragmentManager(), TAG_SAML_DIALOG); - mAuthStatusIcon = android.R.drawable.ic_secure; - mAuthStatusText = R.string.auth_follow_auth_server; + mAuthStatusIcon = 0; + mAuthStatusText = 0; } else { mAuthStatusIcon = R.drawable.common_error; @@ -1113,6 +1127,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList showAuthStatus(); Log_OC.d(TAG, "Access failed: " + result.getLogMessage()); } + } @@ -1550,6 +1565,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList finish(); } } + } @@ -1573,8 +1589,8 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList // TODO - show fail Log_OC.d(TAG, "SSO failed"); } - } + } private void syncAccount(){