summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Lemieux <jplemieux@google.com>2014-01-30 12:00:03 -0800
committerJames Lemieux <jplemieux@google.com>2014-03-07 16:38:48 -0800
commit55d0725ebe4d12c7d1d02f5ee13840c1f200503d (patch)
tree05270e4b7be130c0cfcb1a37e1ad23c843c6a525
parent42c39c4026970508a536099085d5155196bbee42 (diff)
downloadandroid_packages_apps_UnifiedEmail-55d0725ebe4d12c7d1d02f5ee13840c1f200503d.tar.gz
android_packages_apps_UnifiedEmail-55d0725ebe4d12c7d1d02f5ee13840c1f200503d.tar.bz2
android_packages_apps_UnifiedEmail-55d0725ebe4d12c7d1d02f5ee13840c1f200503d.zip
Keep on getting a couldn't sign-in notification
b/11551107 This is caused by ImapConnection.doLogin() only throwing AuthenticationFailedExceptions and not other varieties of exceptions. Our best guess based on the reported bug is that the IMAP server should be returning "UNAVAILABLE" indicating the IMAP server is up and responding but some resource it relies on (e.g. LDAP) is currently down. We translate the "UNAVAILABLE" response code into a Server Error value and display a message to the user and a Retry button. While fixing this bug, I discovered that the ConversationListFooterView that is displayed in response to a authentication failure contains a button called "Sign In" that didn't actually do anything. I made it navigate to the incoming account settings fragment where the user is free to change the relevant account credentials. Change-Id: I2c772ecab18f3e57059eceeae01de08f1fdab4c2
-rw-r--r--res/values/strings.xml3
-rw-r--r--src/com/android/emailcommon/mail/MessagingException.java2
-rw-r--r--src/com/android/mail/browse/ConversationListFooterView.java3
-rw-r--r--src/com/android/mail/providers/UIProvider.java2
4 files changed, 9 insertions, 1 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d31bfd66a..d69f82e4d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -543,6 +543,7 @@
<item>Security error.</item>
<item>Couldn\'t sync.</item>
<item>Internal Error</item>
+ <item>Server Error</item>
</string-array>
<!-- Widget strings -->
@@ -653,7 +654,7 @@
<item>All Folders</item>
</string-array>
- <!-- Button text for the button to click to have the user sign in again. [CHAR LIMIT=20]-->
+ <!-- Button text for the button to click to have the user sign in again or adjust their credentials. [CHAR LIMIT=20]-->
<string name="signin">Sign-in</string>
<!-- Button text for the button to click for more information. [CHAR LIMIT=20]-->
<string name="info">Info</string>
diff --git a/src/com/android/emailcommon/mail/MessagingException.java b/src/com/android/emailcommon/mail/MessagingException.java
index 4d376f535..9b7e8a0fd 100644
--- a/src/com/android/emailcommon/mail/MessagingException.java
+++ b/src/com/android/emailcommon/mail/MessagingException.java
@@ -68,6 +68,8 @@ public class MessagingException extends Exception {
public static final int CLIENT_CERTIFICATE_ERROR = 17;
/** The server indicates it does not support OAuth authentication */
public static final int OAUTH_NOT_SUPPORTED = 18;
+ /** The server indicates it experienced an internal error */
+ public static final int SERVER_ERROR = 19;
protected int mExceptionType;
// Exception type-specific data
diff --git a/src/com/android/mail/browse/ConversationListFooterView.java b/src/com/android/mail/browse/ConversationListFooterView.java
index 68ef61681..4e77b2ec2 100644
--- a/src/com/android/mail/browse/ConversationListFooterView.java
+++ b/src/com/android/mail/browse/ConversationListFooterView.java
@@ -132,6 +132,9 @@ public final class ConversationListFooterView extends LinearLayout implements Vi
case UIProvider.LastSyncResult.CONNECTION_ERROR:
actionTextResourceId = R.string.retry;
break;
+ case UIProvider.LastSyncResult.SERVER_ERROR:
+ actionTextResourceId = R.string.retry;
+ break;
case UIProvider.LastSyncResult.AUTH_ERROR:
actionTextResourceId = R.string.signin;
break;
diff --git a/src/com/android/mail/providers/UIProvider.java b/src/com/android/mail/providers/UIProvider.java
index a4f661ca6..6e9bc371e 100644
--- a/src/com/android/mail/providers/UIProvider.java
+++ b/src/com/android/mail/providers/UIProvider.java
@@ -102,6 +102,8 @@ public class UIProvider {
public static final int STORAGE_ERROR = 4;
/** The sync wasn't completed due to an internal error/exception */
public static final int INTERNAL_ERROR = 5;
+ /** The sync wasn't completed due to an error in the mail server */
+ public static final int SERVER_ERROR = 6;
}
// The actual content provider should define its own authority