* Don't use unneeded managed cursors
* Put more of the DB work in async
* Don't try to load HTML and plaintext simultaneously
* Explicitly catch & handle exceptions during db ops
Bug # 2087051 (see also bug # 2122960 re unexpected db exceptions)
Change-Id: I446086bc4f3a85b2e766b12d1f7271e61e3ae8d5
* Since transactions can be nested, get rid of pointless/dangerous
flag for indicating we're in a transaction.
* Fixes#2131847
Change-Id: I2955e8a7659533e8ee9e71b949a042570466df45
* Make sure to null out vars in onDestroy
* Use START_STICKY as return value for onStartCommand
* Start SyncManager from EasAuthenticator callback, rather from the
authenticator itself (otherwise, the Account might not have been
created when we start SyncManager)
Change-Id: I54ff8d5586e96f016b365587717710dee3202da8
The IMAP & POP messages are being stored with cc="" instead of null,
which is taken care of by testing the output of toFriendly() instead
of the raw field from the DB.
Change-Id: I9460e7ae098ac5cd0ccd527381ffd4e6d9defae4
We lost the reporting of connection errors in the UI. These were
originally displayed in FolderMessageList, under the name of each folder.
In the new implementation, we borrow the "undo" banner from Gmail and
display it whenever there is a connection error in a mailbox.
* Add banner, and code to animate it on/off the top of the list.
* Toggle banner whenever a connection state change occurs in MessageList
* Toggle banner whenever a connection state change occurs in MailboxList
* Slight change to callback semantics for sendMailCallback
As part of http://b/2087222 we have a new API specifically
for launching FastTrack. This allows SHOW_OR_CREATE to be
returned to its original behavior.
I've tested this change and confirmed that it's WAI, and
may have also fixed up some deprecated references.
* Remove SSL-Optional and TLS-Optional choices from UI
* Remove SSL-Optional and TLS-Optional choices from providers.xml
* Switch over most SMTP connections from 25 to 587
* Clean up the providers list which has a lot of "optional" cases
that were probably falling back to unencrypted.
Fixes bugs:
2110243 Settings UI shouldn't offer SSL/TLS (if available) options
2089070 Update list of providers
Change-Id: I57be57b349eed33a5284121d904528279a36a91c
* This reverts commit 3f224e7efe.
* Use StructuredName.DISPLAY_NAME for Email display name on upload
Change-Id: Ic11713773d0e5b0db452dce3c9c31680ca45dbf5
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
* This is not a backward-compatible change (sorry)
* Existing AccountManager EAS accounts and contacts are deleted
* Existing EmailProvider data is deleted
* Change works with new code (stadler) to avoid account duplication
Change-Id: Ife09c51fa714d91054d017b497bce603add5375a
* Write unit test to replicate failure(s) in POP3 use of parseInt. All
calls to parseInt must be guarded by try/catch NumberFormatException.
* Fix the failures
Bug # 2115586
The basic failure mode is to delete an account while it is being
synced or some other background activity. The fixes in this CL will
harden against this, but it will not be a perfect solution; That
will require shutting down all sync, which is difficult in the current
too-many-threads implementation.
Primary bug# 2112564