Merge "Show a less-generic error message for security errors" into froyo

This commit is contained in:
Andrew Stadler 2010-04-06 22:50:06 -07:00 committed by Android (Google) Code Review
commit be4287970b
2 changed files with 8 additions and 0 deletions

View File

@ -1191,6 +1191,9 @@ public class Controller {
case EmailServiceStatus.CONNECTION_ERROR:
return new MessagingException(MessagingException.IOERROR);
case EmailServiceStatus.SECURITY_FAILURE:
return new MessagingException(MessagingException.SECURITY_POLICIES_REQUIRED);
case EmailServiceStatus.MESSAGE_NOT_FOUND:
case EmailServiceStatus.ATTACHMENT_NOT_FOUND:
case EmailServiceStatus.FOLDER_NOT_DELETED:

View File

@ -1484,6 +1484,11 @@ public class MessageList extends ListActivity implements OnItemClickListener, On
case MessagingException.GENERAL_SECURITY:
id = R.string.account_setup_failed_security;
break;
// TODO Generate a unique string for this case, which is the case
// where the security policy needs to be updated.
case MessagingException.SECURITY_POLICIES_REQUIRED:
id = R.string.account_setup_failed_security;
break;
}
}
mHandler.showErrorBanner(getString(id));