X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/b2f18e0f129f97f75b29dc9e3a9145038f5b6e31..71347b48a089a677d7799628abf4056bbd780d71:/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 37ff4912..9ba0970c 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -18,8 +18,6 @@ package com.owncloud.android.authentication; -import java.net.URLDecoder; - import android.accounts.Account; import android.accounts.AccountManager; import android.app.AlertDialog; @@ -51,7 +49,6 @@ import android.widget.CheckBox; import android.widget.EditText; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; -import android.widget.Toast; import com.actionbarsherlock.app.SherlockDialogFragment; import com.owncloud.android.Log_OC; @@ -742,6 +739,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); + } /** @@ -776,7 +774,7 @@ 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()) { String url = result.getRedirectedLocation(); String targetUrl = mHostBaseUrl + AccountUtils.getWebdavPath(mDiscoveredVersion, mCurrentAuthTokenType); @@ -784,8 +782,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; @@ -1131,6 +1129,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList showAuthStatus(); Log_OC.d(TAG, "Access failed: " + result.getLogMessage()); } + } @@ -1163,7 +1162,6 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList response.putString(AccountManager.KEY_AUTHTOKEN, mAuthToken); // the next line is necessary; by now, notifications are calling directly to the AuthenticatorActivity to update, without AccountManager intervention mAccountMgr.setAuthToken(mAccount, mCurrentAuthTokenType, mAuthToken); - Log_OC.e(TAG, "saving auth token: " + mAuthToken); } else { response.putString(AccountManager.KEY_AUTHTOKEN, mPasswordInput.getText().toString()); @@ -1235,7 +1233,6 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList intent.putExtra(AccountManager.KEY_USERDATA, username); if (isOAuth || isSaml) { mAccountMgr.setAuthToken(mAccount, mCurrentAuthTokenType, mAuthToken); - Log_OC.e(TAG, "saving auth token: " + mAuthToken); } /// add user data to the new account; TODO probably can be done in the last parameter addAccountExplicitly, or in KEY_USERDATA mAccountMgr.setUserData(mAccount, AccountAuthenticator.KEY_OC_VERSION, mDiscoveredVersion.toString()); @@ -1587,6 +1584,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList finish(); } } + } @@ -1610,8 +1608,8 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList // TODO - show fail Log_OC.d(TAG, "SSO failed"); } - } + } /** Show auth_message *