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

Merge commit 'be4287970b4218bbcd01955677117110eb1d1d03' into kraken

* commit 'be4287970b4218bbcd01955677117110eb1d1d03':
  Show a less-generic error message for security errors
This commit is contained in:
Andrew Stadler 2010-04-06 22:58:06 -07:00 committed by Android Git Automerger
commit 73c38b8401
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));