Send sync start/finish callbacks in pairs

Bug: 3143544
Change-Id: Ifb8c3c4c12e32df6a7d058446a0279c26048e0f3
This commit is contained in:
Marc Blank 2010-11-03 11:18:07 -07:00
parent 3aca79fbec
commit 12b398fac3
1 changed files with 8 additions and 5 deletions

View File

@ -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