Merge "Add messaging exception status for "attachment not found""
This commit is contained in:
commit
a830547adf
|
@ -60,6 +60,8 @@ public class MessagingException extends Exception {
|
|||
public static final int AUTHENTICATION_FAILED_OR_SERVER_ERROR = 13;
|
||||
/** The server refused access */
|
||||
public static final int ACCESS_DENIED = 14;
|
||||
/** The server refused access */
|
||||
public static final int ATTACHMENT_NOT_FOUND = 15;
|
||||
|
||||
protected int mExceptionType;
|
||||
// Exception type-specific data
|
||||
|
|
|
@ -415,6 +415,9 @@ save attachment.</string>
|
|||
<string name="attachment_info_apk_install_disabled">
|
||||
Applications can\'t be installed directly from Email. First save
|
||||
this application and then install it using the Downloads application.</string>
|
||||
<!-- Error banner when an attachment could not be downloaded due to a problem at the server
|
||||
[CHAR LIMIT=100] -->
|
||||
<string name="attachment_not_found">The attachment could not be downloaded.</string>
|
||||
|
||||
<!-- String used in place of a message that could not be properly decoded (e.g. bad base64
|
||||
data was received.) [CHAR LIMIT=none] -->
|
||||
|
|
|
@ -1594,8 +1594,10 @@ public class Controller {
|
|||
case EmailServiceStatus.ACCESS_DENIED:
|
||||
return new MessagingException(MessagingException.ACCESS_DENIED);
|
||||
|
||||
case EmailServiceStatus.MESSAGE_NOT_FOUND:
|
||||
case EmailServiceStatus.ATTACHMENT_NOT_FOUND:
|
||||
return new MessagingException(MessagingException.ATTACHMENT_NOT_FOUND);
|
||||
|
||||
case EmailServiceStatus.MESSAGE_NOT_FOUND:
|
||||
case EmailServiceStatus.FOLDER_NOT_DELETED:
|
||||
case EmailServiceStatus.FOLDER_NOT_RENAMED:
|
||||
case EmailServiceStatus.FOLDER_NOT_CREATED:
|
||||
|
|
|
@ -35,6 +35,8 @@ public class MessagingExceptionStrings {
|
|||
switch (e.getExceptionType()) {
|
||||
case MessagingException.IOERROR:
|
||||
return R.string.account_setup_failed_ioerror;
|
||||
case MessagingException.ATTACHMENT_NOT_FOUND:
|
||||
return R.string.attachment_not_found;
|
||||
case MessagingException.TLS_REQUIRED:
|
||||
return R.string.account_setup_failed_tls_required;
|
||||
case MessagingException.AUTH_REQUIRED:
|
||||
|
|
Loading…
Reference in New Issue