Send sync start/finish callbacks in pairs
Bug: 3143544
Change-Id: Ifb8c3c4c12e32df6a7d058446a0279c26048e0f3
diff --git a/src/com/android/exchange/EasSyncService.java b/src/com/android/exchange/EasSyncService.java
index cd24535..3f40d44 100644
--- a/src/com/android/exchange/EasSyncService.java
+++ b/src/com/android/exchange/EasSyncService.java
@@ -2283,11 +2283,14 @@
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