Kick syncMailboxStatus callback when syncing Trash/Drafts

Drafts/Trash are not syncable on EAS, but let's kick the callbacks
as the UI is expecting them.

Bug 2989403

Change-Id: I4feac1f0e5471995c14260be6d12329659385e23
This commit is contained in:
Makoto Onuki 2010-09-13 17:29:19 -07:00
parent a2cc46c810
commit cc91619b6a

View File

@ -349,6 +349,12 @@ public class ExchangeService extends Service implements Runnable {
return; return;
} else if (m.mType == Mailbox.TYPE_DRAFTS || m.mType == Mailbox.TYPE_TRASH) { } else if (m.mType == Mailbox.TYPE_DRAFTS || m.mType == Mailbox.TYPE_TRASH) {
// Drafts & Trash can't be synced in EAS // Drafts & Trash can't be synced in EAS
try {
// UI is expecting the callbacks....
sCallbackProxy.syncMailboxStatus(mailboxId, EmailServiceStatus.IN_PROGRESS, 0);
sCallbackProxy.syncMailboxStatus(mailboxId, EmailServiceStatus.SUCCESS, 0);
} catch (RemoteException ignore) {
}
return; return;
} }
startManualSync(mailboxId, ExchangeService.SYNC_SERVICE_START_SYNC, null); startManualSync(mailboxId, ExchangeService.SYNC_SERVICE_START_SYNC, null);