From 12b398fac359521daffb6e0209e77ba944adb1b4 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Wed, 3 Nov 2010 11:18:07 -0700 Subject: [PATCH] Send sync start/finish callbacks in pairs Bug: 3143544 Change-Id: Ifb8c3c4c12e32df6a7d058446a0279c26048e0f3 --- src/com/android/exchange/EasSyncService.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/com/android/exchange/EasSyncService.java b/src/com/android/exchange/EasSyncService.java index cd24535b9..3f40d4476 100644 --- a/src/com/android/exchange/EasSyncService.java +++ b/src/com/android/exchange/EasSyncService.java @@ -2283,11 +2283,14 @@ public class EasSyncService extends AbstractSyncService { public void run() { if (!setupService()) return; - try { - ExchangeService.callback().syncMailboxStatus(mMailboxId, EmailServiceStatus.IN_PROGRESS, - 0); - } catch (RemoteException e1) { - // Don't care if this fails + if (mSyncReason == ExchangeService.SYNC_SERVICE_START_SYNC || + mSyncReason == ExchangeService.SYNC_SERVICE_PART_REQUEST) { + try { + ExchangeService.callback().syncMailboxStatus(mMailboxId, + EmailServiceStatus.IN_PROGRESS, 0); + } catch (RemoteException e1) { + // Don't care if this fails + } } // Whether or not we're the account mailbox