Only sync the given calendar or contacts mailbox
Prior to this CL, if CalendarSyncAdapterService or
ContactsSyncAdapterService received an onPerformSync
for a single mailbox, we'd still sync all calendar or
contacts mailboxes. In addition to just being unneccessary,
it could also trigger extra pings: Suppose that we have
two calendar mailboxes, X and Y. Y is out of sync, so
CalendarSyncAdapterService receives an onPerformSync().
It first syncs mailbox X. As soon as it finishes, it
will restart the ping. The ping will notice the mailbox
Y is still out of sync, and request a sync again.
Instead, in this case, we should just sync mailbox Y
in the first place.
2 files changed