am d2481f95
: Merge change I768138b6 into eclair-mr2
Merge commit 'd2481f95f2707c2f0f6589d65e8f9efeb3fba47a' into eclair-mr2-plus-aosp * commit 'd2481f95f2707c2f0f6589d65e8f9efeb3fba47a': Fix delay sending stuck mail after tapping "Send outgoing mail"
This commit is contained in:
commit
01f2716666
@ -46,7 +46,7 @@ public class EasOutboxService extends EasSyncService {
|
||||
|
||||
public static final int SEND_FAILED = 1;
|
||||
public static final String MAILBOX_KEY_AND_NOT_SEND_FAILED =
|
||||
MessageColumns.MAILBOX_KEY + "=? and (" + SyncColumns.SERVER_ID + " is null or " +
|
||||
MessageColumns.MAILBOX_KEY + "=? and (" + SyncColumns.SERVER_ID + " is null or " +
|
||||
SyncColumns.SERVER_ID + "!=" + SEND_FAILED + ')';
|
||||
public static final String[] BODY_SOURCE_PROJECTION =
|
||||
new String[] {BodyColumns.SOURCE_MESSAGE_KEY};
|
||||
@ -150,9 +150,13 @@ public class EasOutboxService extends EasSyncService {
|
||||
ContentValues cv = new ContentValues();
|
||||
cv.put(SyncColumns.SERVER_ID, SEND_FAILED);
|
||||
Message.update(mContext, Message.CONTENT_URI, msgId, cv);
|
||||
result = EmailServiceStatus.REMOTE_EXCEPTION;
|
||||
// We mark the result as SUCCESS on a non-auth failure since the message itself is
|
||||
// already marked failed and we don't want to stop other messages from trying to
|
||||
// send.
|
||||
if (isAuthError(code)) {
|
||||
result = EmailServiceStatus.LOGIN_FAILED;
|
||||
} else {
|
||||
result = EmailServiceStatus.SUCCESS;
|
||||
}
|
||||
sendCallback(msgId, null, result);
|
||||
|
||||
|
@ -290,7 +290,8 @@ public class SyncManager extends Service implements Runnable {
|
||||
cv.put(SyncColumns.SERVER_ID, 0);
|
||||
INSTANCE.getContentResolver().update(Message.CONTENT_URI,
|
||||
cv, WHERE_MAILBOX_KEY, new String[] {Long.toString(mailboxId)});
|
||||
|
||||
// Clear the error state; the Outbox sync will be started from checkMailboxes
|
||||
INSTANCE.mSyncErrorMap.remove(mailboxId);
|
||||
kick("start outbox");
|
||||
// Outbox can't be synced in EAS
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user