summaryrefslogtreecommitdiffstats
path: root/emailcommon
diff options
context:
space:
mode:
authorJames Lemieux <jplemieux@google.com>2014-09-29 17:51:27 -0700
committerJames Lemieux <jplemieux@google.com>2014-09-29 17:51:27 -0700
commit40236a89316ab2151a8c93de0e286c2f1a9a8d37 (patch)
tree87337a7e3d8e9824a852221348c034edbbf09263 /emailcommon
parentabd75d1adb299237def0d5f072a186fefea77459 (diff)
downloadandroid_packages_apps_Email-40236a89316ab2151a8c93de0e286c2f1a9a8d37.tar.gz
android_packages_apps_Email-40236a89316ab2151a8c93de0e286c2f1a9a8d37.tar.bz2
android_packages_apps_Email-40236a89316ab2151a8c93de0e286c2f1a9a8d37.zip
Display sync errors using snackbar and not as a TL footer
b/16463253 The FAB compose button overlaps the action button found in the TL footer when network errors occur during sync. To avoid this overlap, the snackbar is used to display these errors and they no longer appear as a TL footer. In order to signal the sync error to AAC for display in the snackbar, the Folder.lastSyncResult needed to be encoded in the manner that AAC reads. This was not happening for POP/IMAP/Exchange accounts, so a large portion of this change is encoding that value properly every place it is written. To ensure the value is read/written properly everywhere, common methods were introduced in UIProvider that do this work. UIProviderTest was also added to ensure the read/write methods agree with each other. Finally, the display of the "Load More" TL footer was updated to match the latest spec. Change-Id: I9d3ae1157f288f05b0fed4d1385858f6c9ebfbf9
Diffstat (limited to 'emailcommon')
-rwxr-xr-xemailcommon/src/com/android/emailcommon/provider/EmailContent.java5
-rw-r--r--emailcommon/src/com/android/emailcommon/service/EmailServiceStatus.java1
2 files changed, 4 insertions, 2 deletions
diff --git a/emailcommon/src/com/android/emailcommon/provider/EmailContent.java b/emailcommon/src/com/android/emailcommon/provider/EmailContent.java
index f6766ae2b..0dc87c735 100755
--- a/emailcommon/src/com/android/emailcommon/provider/EmailContent.java
+++ b/emailcommon/src/com/android/emailcommon/provider/EmailContent.java
@@ -35,10 +35,10 @@ import android.os.Parcelable;
import android.os.RemoteException;
import android.provider.BaseColumns;
-import com.android.emailcommon.utility.TextUtilities;
-import com.android.emailcommon.utility.Utility;
import com.android.emailcommon.Logging;
import com.android.emailcommon.R;
+import com.android.emailcommon.utility.TextUtilities;
+import com.android.emailcommon.utility.Utility;
import com.android.mail.providers.UIProvider;
import com.android.mail.utils.LogUtils;
import com.google.common.annotations.VisibleForTesting;
@@ -101,6 +101,7 @@ public abstract class EmailContent {
public static final int LAST_SYNC_RESULT_SUCCESS = UIProvider.LastSyncResult.SUCCESS;
public static final int LAST_SYNC_RESULT_AUTH_ERROR = UIProvider.LastSyncResult.AUTH_ERROR;
+ public static final int LAST_SYNC_RESULT_SERVER_ERROR = UIProvider.LastSyncResult.SERVER_ERROR;
public static final int LAST_SYNC_RESULT_SECURITY_ERROR =
UIProvider.LastSyncResult.SECURITY_ERROR;
public static final int LAST_SYNC_RESULT_CONNECTION_ERROR =
diff --git a/emailcommon/src/com/android/emailcommon/service/EmailServiceStatus.java b/emailcommon/src/com/android/emailcommon/service/EmailServiceStatus.java
index 44922221b..88e5dd29a 100644
--- a/emailcommon/src/com/android/emailcommon/service/EmailServiceStatus.java
+++ b/emailcommon/src/com/android/emailcommon/service/EmailServiceStatus.java
@@ -33,6 +33,7 @@ import android.os.Bundle;
public abstract class EmailServiceStatus {
public static final int SUCCESS = 0;
public static final int IN_PROGRESS = 1;
+ public static final int FAILURE = 2;
public static final int MESSAGE_NOT_FOUND = 0x10;
public static final int ATTACHMENT_NOT_FOUND = 0x11;