am 06e140e4
: Update messaging when autodiscover fails due to an auth error
* commit '06e140e4a42c11e60331229963d27548ea35551c': Update messaging when autodiscover fails due to an auth error
This commit is contained in:
commit
ec1fb96505
@ -390,6 +390,15 @@
|
||||
<!-- "Setup could not finish" dialog text; e.g., Username or password incorrect\n(ERR01 Account does not exist) -->
|
||||
<string name="account_setup_failed_dlg_auth_message_fmt">Login failed.\n(<xliff:g id="error">%s</xliff:g>)</string>
|
||||
|
||||
<!-- Account setup autodiscover auth failure dialog title. This is shown when autodiscover hits
|
||||
an "access denied" server error, which could imply incorrect username/password or that no
|
||||
autodiscover service has been configured for the domain [CHAR LIMIT=40] -->
|
||||
<string name="account_setup_autodiscover_dlg_authfail_title">Problem with account setup</string>
|
||||
<!-- Account setup autodiscover auth failure dialog message. This is shown when autodiscover hits
|
||||
an "access denied" server error, which could imply incorrect username/password or that no
|
||||
autodiscover service has been configured for the domain [CHAR LIMIT=NONE] -->
|
||||
<string name="account_setup_autodiscover_dlg_authfail_message">Confirm username, password, and account settings are correct.</string>
|
||||
|
||||
<!-- An error message presented to the user when the server's identity
|
||||
cannot be established or trusted [CHAR LIMIT=NONE] -->
|
||||
<string name="account_setup_failed_dlg_certificate_message"
|
||||
|
@ -581,7 +581,7 @@ public class AccountCheckSettingsFragment extends Fragment {
|
||||
}
|
||||
|
||||
private static String getErrorString(Context context, MessagingException ex) {
|
||||
int id;
|
||||
final int id;
|
||||
String message = ex.getMessage();
|
||||
if (message != null) {
|
||||
message = message.trim();
|
||||
@ -595,8 +595,10 @@ public class AccountCheckSettingsFragment extends Fragment {
|
||||
: R.string.account_setup_failed_dlg_certificate_message_fmt;
|
||||
break;
|
||||
case MessagingException.AUTHENTICATION_FAILED:
|
||||
id = R.string.account_setup_failed_dlg_auth_message;
|
||||
break;
|
||||
case MessagingException.AUTODISCOVER_AUTHENTICATION_FAILED:
|
||||
id = R.string.account_settings_login_dialog_title;
|
||||
id = R.string.account_setup_autodiscover_dlg_authfail_message;
|
||||
break;
|
||||
case MessagingException.AUTHENTICATION_FAILED_OR_SERVER_ERROR:
|
||||
id = R.string.account_setup_failed_check_credentials_message;
|
||||
@ -811,8 +813,11 @@ public class AccountCheckSettingsFragment extends Fragment {
|
||||
.setMessage(message)
|
||||
.setCancelable(true);
|
||||
|
||||
// Hide title when we get MessagingException.AUTODISCOVER_AUTHENTICATION_FAILED
|
||||
if (exceptionId != MessagingException.AUTODISCOVER_AUTHENTICATION_FAILED) {
|
||||
// Use a different title when we get
|
||||
// MessagingException.AUTODISCOVER_AUTHENTICATION_FAILED
|
||||
if (exceptionId == MessagingException.AUTODISCOVER_AUTHENTICATION_FAILED) {
|
||||
builder.setTitle(R.string.account_setup_autodiscover_dlg_authfail_title);
|
||||
} else {
|
||||
builder.setIconAttribute(android.R.attr.alertDialogIcon)
|
||||
.setTitle(context.getString(R.string.account_setup_failed_dlg_title));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user