01f61ef912
This cleans up a number of bugs that could be generically described as "MailService and Notifications not being updated when accounts or account settings are changed." This also fixes a number of race conditions, one of which was causing accounts to be refreshed in a nearly-endless loop, and another which could cause an endless loop of alarms to be posted & fired.. Specific changes: * Update/reschedule any time an account is edited (this was accidentally broken and being handled on EAS only.) * Make sure we reschedule if an account becomes unavailable * Clear notifications whenever refreshing accounts * Reload local copy of account settings whenever refreshing accounts * When restoring prev sync times (this happens when process is killed), be sure to also recalculate next sync times. * Set flags on the pending intents to make sure old pending intents are not being reused. * Set a watchdog each time we check the mail, so if we are killed during the mail check, we will be woken up again to retry. * Fix a 2nd race condition in which a just-created account fails to sync, due to not (yet) having an inbox. * Clean up handling of Controller callback: * Fix a minor bug in which refresh of non-inbox mailboxes would delay the next timed sync of the inbox for that account. * If the checkmail ended in an error (result != null) the service was never rescheduled. Bugs Fixed: bug 2078149 - Update service and notifications when account settings change or accounts are added/deleted. bug 2084412 - Fix race condition caused by first intent being refired bug 2071484 - Make sure we wake up later if killed during mail check Change-Id: I3ee0d1b389c652351de5eb798c32a2daea244067 |
||
---|---|---|
assets | ||
docs | ||
images | ||
res | ||
src | ||
tests | ||
.classpath | ||
.project | ||
Android.mk | ||
AndroidManifest.xml | ||
MODULE_LICENSE_APACHE2 | ||
NOTICE |