}\r
mHostBaseUrl = normalizeUrl(mAccountMgr.getUserData(mAccount, AccountAuthenticator.KEY_OC_BASE_URL));\r
mHostUrlInput.setText(mHostBaseUrl);\r
+ String userName = mAccount.name.substring(0, mAccount.name.lastIndexOf('@'));\r
+ mUsernameInput.setText(userName);\r
+ mAccountNameInput.setText(userName);\r
}\r
initAuthorizationMethod(); // checks intent and setup.xml to determine mCurrentAuthorizationMethod\r
mJustCreated = true;\r
mUsernameInput.setEnabled(false);\r
mUsernameInput.setFocusable(false);\r
mOAuth2Check.setVisibility(View.GONE);\r
+ mAccountNameInput.setEnabled(false);\r
+ mAccountNameInput.setFocusable(false);\r
}\r
\r
//if (mServerIsChecked && !mServerIsValid && mRefreshButtonEnabled) showRefreshButton();\r
protected void onResume() {\r
super.onResume();\r
if (mAction == ACTION_UPDATE_TOKEN && mJustCreated && getIntent().getBooleanExtra(EXTRA_ENFORCED_UPDATE, false)) {\r
- if (mOAuth2Check.isChecked())\r
+ if (AccountAuthenticator.AUTH_TOKEN_TYPE_ACCESS_TOKEN.equals(mCurrentAuthTokenType)) {\r
Toast.makeText(this, R.string.auth_expired_oauth_token_toast, Toast.LENGTH_LONG).show();\r
- else\r
+ \r
+ } else if (AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(mCurrentAuthTokenType)) {\r
+ Toast.makeText(this, R.string.auth_expired_saml_sso_token_toast, Toast.LENGTH_LONG).show();\r
+ \r
+ } else {\r
Toast.makeText(this, R.string.auth_expired_basic_auth_toast, Toast.LENGTH_LONG).show();\r
+ }\r
}\r
\r
if (mNewCapturedUriFromOAuth2Redirection != null) {\r