Merge commit 'ba78d18f59c73273739260e52d87b2ef8b81ab44' into eclair-mr2-plus-aosp
* commit 'ba78d18f59c73273739260e52d87b2ef8b81ab44':
Clean up appearance of unread counters
Merge commit 'dfeff3d8a71fafae24d55b7710966af06b177924'
* commit 'dfeff3d8a71fafae24d55b7710966af06b177924':
Handle case of moreAvailable true with no changes (#2189704)
Merge commit 'dc9bc35bb1adf4ef5deb4125eb0df0fef0c45dfc' into eclair-mr2-plus-aosp
* commit 'dc9bc35bb1adf4ef5deb4125eb0df0fef0c45dfc':
Handle case of moreAvailable true with no changes (#2189704)
* An Exchange log from Moto has shown sync behavior in which moreAvailable
is set to true even though there are no changes in the sync response
(i.e. the SyncKey is unchanged)
* This leads to long-lived looping which impacts battery life
* The fix is to recognize the behavior and prevent looping by
setting moreAvailable = false
Change-Id: Idef455f3e1170caf4002542ca432d128b3a19e56
Merge commit 'f095e9df5a8dbd97dcefecb479fbcce05ddb4d87' into eclair-mr2-plus-aosp
* commit 'f095e9df5a8dbd97dcefecb479fbcce05ddb4d87':
Clear out orphaned messages in updates/deletes tables
Case #1:
* Fixes#2184702
* Messages can be in the base Messages table, but also in
Message_Deletes and Message_Updates; the latter two were not
being purged of deleted messages.
* This CL deletes from all three tables when a Mailbox is deleted
* Also run a check for orphaned deletes/updates when the email
provider's db is first opened
* Unit test updated to check for proper deletion
* Unit test for the provider check for orphans
Case #2:
* Fixes#2184708
* Messages in Outbox/Drafts can get modified or deleted, but the
rows added to the updates/delete tables never get removed because
the boxes don't sync
* Added code to SyncManager.ping (which gets notifications of these
changes) to delete these rows
Change-Id: Ib53e441136b0da1e88bc220150d631999058a8f0
Merge commit '374c565e07ce32d7a6f8b0ac8516493d1ee5c64e'
* commit '374c565e07ce32d7a6f8b0ac8516493d1ee5c64e':
Fix the bug that the count of draft and trash icons are wrong.
Merge commit '3be8be105c46143b4307d62d7651af5fbf1cb4d6'
* commit '3be8be105c46143b4307d62d7651af5fbf1cb4d6':
Fix the apparance of title according to Gmail
Merge commit '9bb382f43aca0b9afd849e2faf7e5dd450722281' into eclair-mr2-plus-aosp
* commit '9bb382f43aca0b9afd849e2faf7e5dd450722281':
Fix the bug that the count of draft and trash icons are wrong.
Merge commit '7b16a280d9f0831868494e25559c6c0ac743575b' into eclair-mr2-plus-aosp
* commit '7b16a280d9f0831868494e25559c6c0ac743575b':
Fix the apparance of title according to Gmail
Merge commit '3c717848eae316d0b10940e2f84cb5b658cf531d'
* commit '3c717848eae316d0b10940e2f84cb5b658cf531d':
DO NOT MERGE. Prevent duplication of POP3 attachments
Merge commit 'f21d48ba8512767b200b350dd04d1a1000ed6d6e' into eclair-mr2-plus-aosp
* commit 'f21d48ba8512767b200b350dd04d1a1000ed6d6e':
DO NOT MERGE. Prevent duplication of POP3 attachments
Merge commit '53123c2f914db357fa5b4a8451b23c6be77314a5' into eclair-mr2
* commit '53123c2f914db357fa5b4a8451b23c6be77314a5':
DO NOT MERGE. Prevent duplication of POP3 attachments
Merge commit '53123c2f914db357fa5b4a8451b23c6be77314a5' into eclair-plus-aosp
* commit '53123c2f914db357fa5b4a8451b23c6be77314a5':
DO NOT MERGE. Prevent duplication of POP3 attachments
* For each attachment we add, check the DB for an existing attachment
with similar metadata (name, mime type, content id, etc.)
* Skip adding them if already held
* Unit tests
Originally fixed in 5b0a12c199 / CL I036f39c6
Fixes bug http://b/2084704
* For each attachment we add, check the DB for an existing attachment
with similar metadata (name, mime type, content id, etc.)
* Skip adding them if already held
* Unit tests
Fixes bug http://b/2084704
Merge commit '77c7ce54be778ca93a11069cc152b67d10bcff5f'
* commit '77c7ce54be778ca93a11069cc152b67d10bcff5f':
Do not trust server-provided content type for attachments
Merge commit 'e3e02adac681790ff4bea653e273f7e2b0eea35b' into eclair-mr2-plus-aosp
* commit 'e3e02adac681790ff4bea653e273f7e2b0eea35b':
Do not trust server-provided content type for attachments
Merge commit 'dee4e25320c5154a5626446e1aa37f63ae97c48c' into eclair-mr2
* commit 'dee4e25320c5154a5626446e1aa37f63ae97c48c':
Do not trust server-provided content type for attachments
Merge commit 'dee4e25320c5154a5626446e1aa37f63ae97c48c' into eclair-plus-aosp
* commit 'dee4e25320c5154a5626446e1aa37f63ae97c48c':
Do not trust server-provided content type for attachments
* Fixes a bug that caused some attachments to be labeled with the
wrong content type and thus unable to be opened by local apps.
* When the attachment code was written, MimeTypeMap had very few
entries, so we tried to get the mime type of Exchange attachments
from the stream when the file was read off the server. It turns
out that the server's idea of mime type is unpredictable
* In the meantime, MimeTypeMap has been fleshed out, so we really
do know the type in the vast majority of cases (and including all
common document types)
* The fix is to remove the lines related to reading the mime
type from the attachment stream
* Content type is set (properly) when attachment record is created. See
EasEmailSyncParser.getMimeTypeFromFileName() for details.
Fixes bug http://b/2182955
Change-Id: Iebb3de529df4548327d7112e1dedb3bd448462a4