Fixes bug # 2148971
Note, this condition happens when we APPEND a message to the server
but then we turn around and query for it, and the server reports that
it's not there:
>>> 7 APPEND "Sent" {490}
<<< #null# [Ready, for, argument]
<<< #null# [194, EXISTS]
<<< #7# [OK, [APPENDUID, 1233339552, 1191], APPEND, completed]
>>> 8 UID SEARCH (HEADER MESSAGE-ID \
<pwyc0i5yviwvu5nwio2lwdo5.1254073239445@email.android.com>)
<<< #null# [SEARCH]
<<< #8# [OK, UID, SEARCH, completed]
>>> 9 UID SEARCH UID NULL
<<< #9# [BAD, UID, SEARCH, error;, bogus, or, incorrect, syntax, \
of, search, critera]
I don't know why the Yahoo! server did this, but now we'll at least not
crash if they do it again.
* Create logic to detect upsyncable messages in Sent
* Note: Drafts is now local only for IMAP - no sync, either way
* Rewrite MessageController.processPendingAppend for Provider world
* Write provider message -> legacy message converter
* Fixed bug in IMAP APPEND (it was not picking the right UID for the
uploaded message.)
* Better handling of server internaldate
* Add constants for new X-Android-Body-Quoted-Part header
* Add EmailContent routines to get each of the 5 parts of the body
* Remove "Load more" from unsynced message lists
* Add toString to MimeHeader for debug support
Bug # 2097471
TODO (next CL): Upload attachments records too
Change-Id: I209182f5adc6b6696919f559e3cbbdd58b3eed3a
Reimplement a dropped snippet from the original MessagingController
that preserved locally-created special mailboxes (drafts, sent, etc.)
instead of dropping them when they were not found on the server.
Bug # 2078209
* Seems to improve UI responsiveness while doing large syncs,
but it can still slow down quite a bit
Change-Id: I539b8a9a96a922d810fba02ff4093759489a8153
* in onActivityResult, we not only need to update the Account, but also
the relevant HostAuth (both if coming from AccountSetupExchange)
Change-Id: I0657ff257fe949e46e100eb3e6cfec6162514aa9
* Otherwise, there's a chance that various activities will be
disabled (like MessageCompose), even if there are existing
accounts.
* Enable BootReceiver by default
Change-Id: Id4669c41a846545d8bac5ad85736e1508074864a
* syncServerId in the Message table can now be NULL; this broke a test
used by EasOutboxService and SyncManager to determine whether there
were sendable messages in the Outbox
* Changed test to allow for NULL in syncServerId
Change-Id: Id76c7a45bc306abe7a927ab2395700f54a01a298
* Add new introText column in the Body database
* Reply/Forward put the appropriate String into this new column
* Rfc822Output uses this when required when streaming the message
Change-Id: I34602fdb3f91692c46fc8bc31ba0e6f680d445a0
* If not, it will start the service
* This will catch cases in which the Email process has been killed
while alarms are set (this would be the vast majority of the time)
* Will look into ways of catching any remaining cases...
* Fixes#2131432
Change-Id: Id71e68d14b5d1b0402c866db49a07c7b1adf499d
* Our AccountManager listener was getting unregistered due to the way
ApplicationContext caches AccountManager in a static member
* The result was that AccountManager registers its listeners against the
FIRST context it is instantiated with! Future calls will all obtain
this pre-initialized AccountManager.
* In this case, AccountSetupOptions was the first caller (to create the
AccountManager Account for Exchange)
* The subsequent call to register a listener therefore had its registration
tied to the context of AccountSetupOptions, and was therefore leaked
when AccountSetupOptions finished!
* This caused a chain of problems - the leaked receiver, an Exception in
AccountManager when trying to ping the listener in an expired context,
and eventually the bug referenced above, which became a P1 issue
Change-Id: I478e28d21ca77419afa8011e4ed8101cdf67ab79
* Fixes#2135238 in which a change to a POP/IMAP mailbox
ended up causing a sync of that box as an EAS mailbox
* The fix is to check that mailboxes with changes actually
belong to an EAS account before trying to sync them
Change-Id: I832095ce61665813cbcfb2aa58e45a48db8a34e7
* Get rid of old Account.getxxxFolderName() calls.
* Clean up any call sites to them
* Properly rename the existing special folder name identifiers
* Use a hash table in MessagingController to improve identification
of special folders for IMAP accounts
* Fix a bug in Controller, which was creating new server-side folders
using localized names.
* Fix a bunch of code in Controller that was using mContext, instead of
using mProviderContext to support testability.
* Fix broken unit tests in ControllerProviderOpsTests
Fixes bug 1904373
* Check that SyncManager's thread is running when called for startSync;
if not, start the service via Intent
* Mostly fixes#2133115 (although there are possibly other cases for
SyncManager not running, this will cause any manual "Refresh" to start
it up.)
* Added large comment at onCreate to explain how all this works
Change-Id: Ib43211ddb36e2f79ee5b1f6973f8bc2bc499024c