* Turns out that DURATION is required by CalendarProvider, and
DTEND has a different meaning than it does to EAS
* Fix downsync to create proper recurring events
Change-Id: Ibf85422de73579a93de89b2c27c13f96994bedc8
What should be working:
* Events sync down from server and appear in calendar
* Recurrences and exceptions appear in calendar
* Changed events on server should be reflected in calendar
* Deletions on server should be reflected in calendar
* Push of new/changed/deleted events should work
* Changes on device are NOT synced back to server
* New, single events on device are synced back to server
(no time zone, attendee, or recurrence support)
* Checkbox for syncing calendar added to setup flow
* System sync glue in manifest, etc.
* Bugs are to be expected
* A few unit tests; needs more
Change-Id: I7ca262eaba562ccb9d1af5b0cd948c6bac30e5dd
- Dynamically switch to the alternate exchange strings to substitute overlays.
- Added the mechanism to load the "vendor policy", which tells you when the
alternate strings should be used.
Bug: 2382710
Merge commit '08d92ebf4722e45216ee225775a3b86f9ceecc0d'
* commit '08d92ebf4722e45216ee225775a3b86f9ceecc0d':
Trim the mime type portion of Content-Type.
* AccountSetupExchange defaultly tries using EAS AutoDiscover, which isn't
appropriate in the unit test setting
* Add an Intent extra to disable AutoDiscover and use it in unit tests
Bug: 2382368
Change-Id: I3d4e8d7194b02da44ad583da0cf2fe60ffb19311
* Includes some refactoring of internal "request" code in SyncManager
* Adds Message flags to tag meeting invites and cancellations
* Adds meetingResponse method in EmailService
* Hooks into Controller and MessageView UI included
Change-Id: I4c5e10bccc4b41956b94d9dfa55925e5af030939
* Add IMAP ID command to all login sequences
* Send generic information for now
* Explicitly catch & discard parsing errors, since we really don't
care if the command succeeds or not.
* Unit tests
Bug: 2332183
* Upgrade accounts table to add security column
* Read/Write new column
* Backup/Restore new column
* Unit tests for all of the above
* First cut at defining bitfields (non-binding, just putting down ideas)
Bug: 2387961
* Followup to 85d765f4
* Workaround for (HTC bug: 2275383) & (Moto bug: 2226582)
* Restores mSyncKey as null instead of empty string, which is how
a new account is initialized. Bug: 2385980
* Cleanup synchronized logic in backup & restore
* Minor cleanups & improved comments
Cherry-picked from master d612717340
* Followup to 5e91cccd
* Workaround for (HTC bug: 2275383) & (Moto bug: 2226582)
* Restores mSyncKey as null instead of empty string, which is how
a new account is initialized. Bug: 2385980
* Cleanup synchronized logic in backup & restore
* Minor cleanups & improved comments
Merge commit '85d765f41c20e6efb3b120055eb4f1efae166e8b' into eclair-plus-aosp
* commit '85d765f41c20e6efb3b120055eb4f1efae166e8b':
Quick backup/restore of accounts DO NOT MERGE
* Workaround for (HTC bug 2275383) & (Moto bug 2226582)
* Adds checkpoints for backing up and restoring accounts
* Uses legacy Account / prefs to back up accounts - this is because
some of this code will be reused for legacy account migration
* Unit tests of Account & LegacyConversions
* Unit tests of backup & restore
* Not done: testing of EAS/Account Manager interface (this will require
deeper dependency injection, to avoid the embedded calls to the Account
Manager and other system services.)
Cherry-picked from master 5e91cccd4b
* Workaround for (HTC bug 2275383) & (Moto bug 2226582)
* Adds checkpoints for backing up and restoring accounts
* Uses legacy Account / prefs to back up accounts - this is because
some of this code will be reused for legacy account migration
* Unit tests of Account & LegacyConversions
* Unit tests of backup & restore
* Not done: testing of EAS/Account Manager interface (this will require
deeper dependency injection, to avoid the embedded calls to the Account
Manager and other system services.)
* Due to the order in which account creation occurs in the Provider
and in AccountManager, and the fact that there are data observers
on each that initiate account reconciliation, a race condition exists
that can cause either of these accounts to appear to be orphaned,
and thereby get deleted
* We add an "incomplete" flag to the Account in EmailProvider and
set/clear it during account creation. The various reconciliation
methods will ignore accounts marked as incomplete.
Bug: 2353755
Change-Id: I13fb144dd857f839eb3471b01f271f3a0d4d8159
* Make sure 403 error in autodiscover isn't treated as an auth error
(401 is used for that)
* Make non-auth errors in autodiscover fail silently (and move user
to manual setup)
Bug: 2374302
Change-Id: I4699bff70cf5ec4a513e6443e4817543c2ab2cef
* Autodiscover allows complete configuration using only email address
and password
* Code handles the two standard autodiscover addresses and redirect
* Autodiscover process starts when the user chooses "Exchange" as the
account type. If the account is created via the AccountManager,
autodiscover begins upon tapping "Next" for the first time
* If autodiscover fails due to anything other than auth failure for
autodiscover-capable servers, the user is placed into the standard manual
configuration screen
Bug: 2366019
Change-Id: I936712b924833d9a133e8da04e11c3ba45d92f92
Merge commit 'd1c56ea144fb3e91ad1fdf8bba4c57531ec9cc18' into eclair-plus-aosp
* commit 'd1c56ea144fb3e91ad1fdf8bba4c57531ec9cc18':
Ensure protocol version always set in sync services DO NOT MERGE
* A recent change caused an issue in which protocolVersion could
be null, resulting in an NPE
* Ensure that protocolVersion is always set to a valid version,
defaulting to 2.5
Change-Id: Ifba6c8089fdbd93dffe38ab9895cfd3e994e29d0
Bug: 2353859
* A recent change caused an issue in which protocolVersion could
be null, resulting in an NPE
* Ensure that protocolVersion is always set to a valid version,
defaulting to 2.5
Bug: 2353859
Change-Id: I6e07ba3df5362c988658e401bebc1776a6780876
1. Replaced SSLContextImpl with SSLContext with TLS. (They're the same, according to crazybob)
2. Copied SSLSocketFactory from org.apache.http.conn.ssl, so that we can use the hidden costructor. (Which wasn't in the original code -- it was added by the android team, which is why it's hidden.)
Merge commit '78f609db56500c01f75ea2d8742468907255f7ba'
* commit '78f609db56500c01f75ea2d8742468907255f7ba':
MessageView: upon delete move to older instead of newer.
Merge commit '9d024a5b4f42d9d7687d06e5f86f9c68f22fccf8'
* commit '9d024a5b4f42d9d7687d06e5f86f9c68f22fccf8':
MessageCompose: fix NPE cased by WebView set to null in onDestroy().
MessageListAdapter.doRequery() is supporsed to do the same thing as CursorAdapter.onContentChanged() does. So the entire method body can be replaced with super.onContentChanged().
Merge commit '27051e480f9cc5396aacc3cc5e520d5875390548' into eclair-plus-aosp
* commit '27051e480f9cc5396aacc3cc5e520d5875390548':
Use correct EAS version in Outbox (fixes#2319892) DO NOT MERGE
Merge commit 'bfc5de35fa08b6e747e5d5afe72bffafca08ce2a' into eclair-plus-aosp
* commit 'bfc5de35fa08b6e747e5d5afe72bffafca08ce2a':
Fix delay sending mail after tapping "Send outgoing mail" DO NOT MERGE
Merge commit 'c874824ca8b76f795575538ffa34138e2de47cad' into eclair-plus-aosp
* commit 'c874824ca8b76f795575538ffa34138e2de47cad':
Don't delete referenced messages from the Exchange server DO NOT MERGE
* The existing flow is badly broken; every "back" causes the user
to leave the setup flow and therefore have to start from scratch.
This is a very bad user experience, as previously entered data is
lost and must be re-entered.
* The fix corrects these problems, allowing the user to back up
through screens UNTIL the account is successfully created.
* After account creation, the user is returned to the proper screen,
depending on whether we're in "eas flow mode" or not
Bug: 2337511
Change-Id: Ie25ac73dfcd8a1dca36e1b31c75ffb22359840d1
Seems like it's the simplest way to make it.
- Base64 no longer implements BinaryEncoder/Decoder. Email app doesn't use them.
- Copied Decoder/EncoderException. Email app doesn't catch them either.
* Addresses #2287439 incompletely
* The most likely reason for a reply/forward to get stuck in the Outbox
is that the referenced message has been deleted from the client, with
the deletion occuring BEFORE the message gets sent (currently, the two
are completely independent)
* This change causes deletes NOT to be sent to the server if the message
to be deleted is referenced by an outgoing message
Change-Id: Iad3777282385bea82276f363d6f95ba8b07cc01c
* Fixes#2317429
* When "Send outgoing messages" is tapped in Outbox MessageList view,
we clear the error state for all "stuck" messages
* We didn't, however, clear the error state of the Mailbox, which doesn't
clear itself until the end of a pingLoop, which can be up to 30 minutes
* The fix is in two parts:
* We clear the error state of the Outbox when a sync is requested by
the UI
* We don't set the error state of the mailbox for non-auth errors when
sending, because we don't want to block OTHER messages from getting sent.
Change-Id: I06d98e54049b01c2156b1bc3ebbccf043e7b93f5
* We inadvertently failed to set the EAS version in EasOutboxService,
so the default of 2.5 is used
* This works, but SmartReply/SmartForward were enhanced in 12.0 and we
aren't taking advantage of those changes
* The fix is to set the version using common code
Change-Id: Ife6689fa9934da42d98a48df74fca90ba6d1718c
* Fixes 2313077
* Broadcast receivers are run in the UI thread, so we must ensure that
any long-running code is executed in a background thread
Change-Id: I9a3d501a308445a84a1baa99fc6abb9feb56ff2d
* Fixes#2317429
* When "Send outgoing messages" is tapped in Outbox MessageList view,
we clear the error state for all "stuck" messages
* We didn't, however, clear the error state of the Mailbox, which doesn't
clear itself until the end of a pingLoop, which can be up to 30 minutes
* The fix is in two parts:
* We clear the error state of the Outbox when a sync is requested by
the UI
* We don't set the error state of the mailbox for non-auth errors when
sending, because we don't want to block OTHER messages from getting sent.
Change-Id: I768138b6f31eb696811aa94f621b6fa758ec1a5e
* Addresses #2226426
* Recognize the case in which there is no EmailProvider Account corresponding
to an AccountManager account (the case being addressed is that of the
EmailProvider database being deleted due to corruption
* In this case, delete the AccountManager account so that the two are in
sync
* Refactor and add unit test for account reconciliation
Change-Id: I356b8bfaa0846f85223cc15994b750df207a63ea
* We inadvertently failed to set the EAS version in EasOutboxService,
so the default of 2.5 is used
* This works, but SmartReply/SmartForward were enhanced in 12.0 and we
aren't taking advantage of those changes
* The fix is to set the version using common code
Change-Id: I3b505448003f340681deeb8fb22e61e9dd8d10a0
* Addresses #2287439 incompletely
* The most likely reason for a reply/forward to get stuck in the Outbox
is that the referenced message has been deleted from the client, with
the deletion occuring BEFORE the message gets sent (currently, the two
are completely independent)
* This change causes deletes NOT to be sent to the server if the message
to be deleted is referenced by an outgoing message
Change-Id: I146f63ab345c07e684790e1d7d1fc08870468bbf
* Addresses #2226426
* If the user deletes Email data, or if data corruption causes
EmailProvider.db to be deleted, we will be in an inconsistent
state with any existing Exchange accounts, since the AccountManager
will still know about them, contacts (and eventually calendar) items will
continue to exist, etc.
* Run an integrity check when the provider is created, deleting any
orphaned EmailProvider.db or EmailProviderBody.db
* Catch SQLiteException's in the Provider and do an integrity check
if any is caught
Change-Id: I47d523b90a6b8f71ba8e13fba4b04846b3da1b1d
turns out the change I submitted before is not required at all. I mistakenly
assumed sqlite wouldn't be able to handle it. but tested it with the latest
version of sqlite 3.6.20. the old style triggers work fine.
* When a mailbox sync is stopped intentionally (for example, if account
settings change), we report a connection error by mistake
* Handle this case properly, reporting "success" (i.e. no error state)
* Remove obsolete comment
Change-Id: I9bec1244267cd2240c369b9b7f905948381a0f91
* Related to MR1 triaged bug 2274389 in which mail was stuck in the
Outbox and wouldn't send
* It turns out an improper constant was being used in the SQL code
for turning off the "error" state flag
Change-Id: Ic1a2e5b9dd34ec3f9d7da0b3d2cd63d77bb7681e
* The "send outgoing messages" button doesn't work in the combined
inbox (the case wasn't handled)
* Add code to loop through accounts, calling the Controller for each
in this case
* Fixes (partially or completely) #2274389
Change-Id: I94e984247d43f93a4d6546b8c10f6ce149b091be
* When settings are changed, we loop through the sync error map,
clearing mailboxes in the changed account that are in an error
state.
* It's possible that there are mailboxes referenced in the map that
no longer exist. When trying to retrieve them from the provider,
null is returned, but we're not checking for this case, and an
NPE results.
* The fix is simply to check for null, and clear the error map for
the mailboxId that references a deleted mailbox
Change-Id: I8c1c847090026fa1c53b09bbe6b12d864bce4df1
* Currently, we validate EAS accounts using a command that will
succeed even if we do not support required security policies.
* This causes a confusing "invalid username or password" error
when trying to sync with a validated account in the case that
there are, in fact, required policies
* The fix is to send a sync command after validating the user name
and password; a 403 error indicates the requirement for
security policies.
* When we see the 403 error, we put up a message that is appropriate
to the situation.
Change-Id: I74e132cb81f021cbb697cc9ee146405bf3ebc0ba
* Currently, we validate EAS accounts using a command that will
succeed even if we do not support required security policies.
* This causes a confusing "invalid username or password" error
when trying to sync with a validated account in the case that
there are, in fact, required policies
* The fix is to send a sync command after validating the user name
and password; a 403 error indicates the requirement for
security policies.
* When we see the 403 error, we put up a message that is appropriate
to the situation.
Change-Id: Ic40820253dca1f357297b2355ad987bc39d0775f
* Fixes#2216885
* The bug is that the sync adapters weren't set up to handle chunked
encoding, primarily because 1) I hadn't seen any servers use it, and
2) when we changed from HttpUrlConnection to HttpClient, support for
chunked wasn't added (HttpUrlConnection didn't support it)
* The fix for xml data is trivial, since the Content-Length returned in
the chunked case (-1) was being disallowed, but works perfectly well
with HttpClient.
* The fix for attachments is less trivial, but still straightforward.
* With this change, we are no longer dependent on receiving content-length,
which is highly desirable
Change-Id: I8d46790e41eaeee2887c8a207006c5d6786498ed
* The prior fix prevented looping in the case that a new sync key wasn't
received.
* Unfortunately, the prior fix tested for the looping condition (moreAvailable)
before it would have been set.
* The correct fix is to detect the looping condition after both the sync key
and the moreAvailable flag are guaranteed to have been set
Change-Id: I2eee4ddc123fb2a5ce4ef3bd4e7d0614fcfbdf36
* Fixes#2216885
* The bug is that the sync adapters weren't set up to handle chunked
encoding, primarily because 1) I hadn't seen any servers use it, and
2) when we changed from HttpUrlConnection to HttpClient, support for
chunked wasn't added (HttpUrlConnection didn't support it)
* The fix for xml data is trivial, since the Content-Length returned in
the chunked case (-1) was being disallowed, but works perfectly well
with HttpClient.
* The fix for attachments is less trivial, but still straightforward.
* With this change, we are no longer dependent on receiving content-length,
which is highly desirable
Change-Id: Ie3bd6af0cf68f3afa190711d96b1dbd2e6341f79
* The fix to bug #2191778 inadvertently broke attachment loading for
Exchange 2003 servers; the server responds with a 403 error (indicating
an authentication issue)
* All other communications with the server work properly
* We use a slightly different set of calls in the case of attachments (we
wanted to change as little as possible in the fix to #2191778) than we
do in the other cases
* The fix here is to use the same calling sequence for attachments that we
use elsewhere
* This fix has been observed to work on multiple servers, and in various
SSL scenarios (on/off, trusted/untrusted)
Change-Id: Ie2804ddcbfa2b10edff42f7a3811734c325e933d
* Folder delete had a subtle error that could cause subsequent folder
changes in the same sync to fail (using wrong end tag)
* Folder change (rename, move) wasn't implemented; this was added and
tested. The change is very straightforward and low risk.
Change-Id: I9733dc5da1a535c388e2feb299a641642ba531c2
* Folder delete had a subtle error that could cause subsequent folder
changes in the same sync to fail (using wrong end tag)
* Folder change (rename, move) wasn't implemented; this was added and
tested. The change is very straightforward and low risk.
Change-Id: Id69cee9b99e9a988a176a6525ba9a1615b741c44
* The problem is that PendingIntents aren't updated when a notification
is updated, so the changed extras when a 2nd account gets a new message
aren't seen by MessageList when it's started up upon tapping the
notification (it uses the extras from the 1st account to get a new
message)
* The fix is to use the newish (cupcake) flag in the PendingIntent that
causes the extras in the PendingIntent to be updated
Change-Id: If12d0e7c6d3f256befeca98b560443395820737f
* Fixes#2173664
* Make sure that not only is the OPTIONS command accepted, but that
the server reports EAS versions and commands
Change-Id: Ic29d3eacfdc54d107600afc443964a1e8b3d5e59
* 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: Icf45efbc24331c874c820b7b177e39b16df445d8
* The problem is that PendingIntents aren't updated when a notification
is updated, so the changed extras when a 2nd account gets a new message
aren't seen by MessageList when it's started up upon tapping the
notification (it uses the extras from the 1st account to get a new
message)
* The fix is to use the newish (cupcake) flag in the PendingIntent that
causes the extras in the PendingIntent to be updated
Change-Id: Ia4ab14954b2c1413526016975216b2516372f2aa
* 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
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
* 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 'dee4e25320c5154a5626446e1aa37f63ae97c48c' into eclair-mr2
* 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
* If we close the activity while a requeryList() is pending in the
handler queue, we'll eventually try to operate on a closed cursor
when we get to testMultiple().
* The fix: Return immediately if the cursor is not available.
Fixes bug http://b/2180416
Followup for bug http://b/2149083
* Relates to a number of bugs related to ANR's and slow behavior
when addressing mail
* Call changeCursor(null) on the Adapter when the activity is destroyed
* Call getCount() in the background thread to force data there rather
than in the UI thread
* If this change is accepted, something equivalent should be
used in the Gmail app as well
* Addresses #2180237 (P1, target Eclair_Sholes) as well as
#2180976 and #2146926, the latter two of which were fixed
with workarounds.
Change-Id: I7503c5fbe091dbc5e784d5a7bebeb3d60226d57d
Merge commit '1a377f096f3a263bba536355823290db4bba7434' into eclair-mr2
* commit '1a377f096f3a263bba536355823290db4bba7434':
MessageCompose: corretly set initial mSourceMessageProcessed=true for the cases where there's no source message, to avoid duplicated email addresses on orientation change.
Merge commit 'ea878be11729cd793d9183fc264118241cd5a5b6' into eclair-mr2
* commit 'ea878be11729cd793d9183fc264118241cd5a5b6':
Make sure we hold WakeLock during mail sending (fixes#2180551)
* Don't runAsleep unless this is a Ping
* Relates to #2178288 in that it's possible that the system could
sleep while we're trying to send (not sure if this is possible;
will check), so we prevent it by holding a WakeLock in this case
Change-Id: Ib3f8786501b942e1cfcb7a0bbb07b8e3084e2a86
Merge commit '479b22a2f8966b63789c89e878b615ebd53708c0' into eclair-mr2
* commit '479b22a2f8966b63789c89e878b615ebd53708c0':
Make multiselect buttons update when the list state changes
Merge commit '4b59cfc8ed4054ffb5ad85cea8aba94a430cc2cb' into eclair-mr2
* commit '4b59cfc8ed4054ffb5ad85cea8aba94a430cc2cb':
Fix problem with timeouts and sending attachments (#2178288)
* Standard Exchange command timeouts are 20 seconds
* For sending, however, these need to be significantly longer to
handle the case of sending large attachments, as sending (of any
length) happens in a single HTTP Post command
* Having an infinite timeout leads to the (small) possibility of the
Outbox hanging for a long time, holding up the sending of other
mail, so we set a long, but not infinite timeout for this case
* Timeout now set for 15 minutes
* Prevent sync of Outbox and Drafts (the UI triggers these by changing
the contents of these boxes, but we need to ignore the pings that
are generated this way)
Change-Id: I5b830d6b4e94525d95138b2112be12898a37882e
Merge commit '73032f4657a77f733a348fe3c2c1fa783d335ff0' into eclair-mr2
* commit '73032f4657a77f733a348fe3c2c1fa783d335ff0':
Email: exit AsyncTask.onPostExecute() if the result is null or isCancelled().
* Fixes#2173664
* Make sure that not only is the OPTIONS command accepted, but that
the server reports EAS versions and commands
Change-Id: I15dccd1fbd06aa3cf2ba8fbbf72d20918ec44617
Merge commit '5b26bbe4551ca095697f07eca7d09b24573cba11' into eclair-mr2
* commit '5b26bbe4551ca095697f07eca7d09b24573cba11':
Switch QuickContact presentation from MEDIUM to LARGE.
Some IMAP servers return NIL if you BODY.PEEK[TEXT] a messsage with
no body, instead of the more canonical {0}CRLF. Instead of messing with the
parser to deal with that, it makes more sense not to try and fetch empty
bodies. So there are three changes:
* Don't fetch parts when size = 0
* Don't append "null" when there is null body text
* Slight change to attachment handling so size is reported >0
* Unit tests on some of the related lower-level protocol stuff
Bug http://b/issue?id=2160387
Change-Id: Ifb8fb0ed5ce7297908e1ae8d5a02dda5975c4a3c
Merge commit 'e1b5e8574c86e4dcc184f1b3a4db352c9a631d99' into eclair-mr2
* commit 'e1b5e8574c86e4dcc184f1b3a4db352c9a631d99':
Help with another push inconsistency edge case (#2131432)
Merge commit '85d718cb0735de9069673fbf9834fa64459c2178' into eclair-mr2
* commit '85d718cb0735de9069673fbf9834fa64459c2178':
MessageCompose: quote plain-text body if available, otherwise quote HTML body.
* MessageCompose now adds message-id to new messages (it was previously
done on its behalf by MimeMessage).
* LegacyConversions.updateMessageFields() now handles missing message-id
without error.
* Unit tests for the LegacyConversions change
These two issues were combining with a failure of comcast's SMTP server
to insert message-id headers, to prevent delivery of a message between
any two comcast accounts using this client.
Bug # http://b/issue?id=2161478
* If we are forced to abort a "ping" due to a watchdog alarm, we should
handle this as a ping failure (which potentially changes the heartbeat)
rather than a garden variety IOException.
* This prevents the additional overhead of connection error backoffs,
which would only tend to increase the time needed to recover from the
error.
* In one case reported by Moto, this appears to be the behavior of a WiFi
router with NAT timeout. This fix will cause maximum delay for pushed
mail to be reduced in most cases.
Change-Id: I2b0e3b10d82762d20f63cac3ac4638a03f13f842
* Older parsing code that didn't take into account the fact that
'flag' is a structured data item
* Requires Dr. No approval for Eclair_Sholes
Change-Id: Id1c0bc24e784b19c598d2b852975e135abebbdb0
* It has been reported that messages for a particular user are not
staying in sync re: deletions via PC
* This hasn't been reported elsewhere
* The new logging command logs the subject of deleted messages which
will help track down the problem
* I have also requested, and expect to receive, an account on the
Moto server in question to try to replicate the issue
Requesting Dr. No approval for this important change to user logging
code.
Change-Id: I13229d843ef828b54f3514bdded5a7561a87989a
* Unsafe (potentially stale) data was being written to the Mailbox table near
the end of each sync. It would effectively undo changes made to the
Mailbox in other threads that occurred while the Mailbox was syncing.
* In this particular case, changes to sync interval (push/ping/timed)
were being overwritten, which could cause push to get lost for as
long as 30 minutes (the pingLoop timeout when there aren't any
pingable mailboxes)
* Watchdog alarm was being set to wrong time (typo)
* Add extra user logging in case there are additional cases of push
* Only set sync status and time on successful sync
* Move ping error check into pingParser to avoid unnecessary sync
Change-Id: Icb4494078480ada39b7494b3abf380fb08858406
* Make sure service callbacks are installed
* Route from service sent-message callback to controller results
This sends the callback information back to listeners who care about
sent messages. Note, due to impedance mismatch between the service
and the controller, this should not be used for much more than an
indication that outbox status has changed.
Bug # 2158497
Change-Id: I8d013d97ef53dcca85216f9b8c027ba3917c1e85
* Removed obsolete "delete after 7 days" option from pop-up prefs
* Mark deleted message sentinels as "read" so they don't contribute
to unread counts.
Bug # 2157487 and Bug # 2159278
Change-Id: Ic3cbc51d6f5ede2eb923e2d0e5c0dfee377764f5
* Add AttachmentProvider.deleteAllMailboxAttachmentFiles
* Call it when server deletes a mailbox
* Confirmed (no change) all message deletes call deleteAllAttachmentFiles
* Unit tests of course :)
Bug # 2069004
Change-Id: I99731e6489fdca4cc9cebdff5fcf9c09d12b7b3a
* Catch onContentChanged and throttle calls to cursor.requery()
* Use 2.5s for now. This seems to provide excellent responsiveness
with little apparent latency.
* Also fixes#2135882
Change-Id: I9cab6558c9cfeb1dbdb5fb250f4f04059db324f7
* New menu items in MessageList
* Show/hide menu item if anything is checked
* Clear the selected items map, redraw listview, hide button panel
Bug # 2116257
This prevents these activities from ever repeating on the task stack.
Helps http://b/issue?id=2149204 (and may even fix it)
Change-Id: Idf8255b703094a78a2df3e9f535b67fd65faef32
BUG: 2149171
* Change the string of combined inbox
* Change the string of combined starred folder
* Change the icon for combined inbox
* Change the icon for combined starred folder
* Add "Accept all certificates" modes to incoming/outgoing secure choices
* Change URI scheme slightly to make "trust" a flag, not part of the
protocol.
* Change Stores to know about new URI scheme
* Slightly rework Transport API to make "trust" an independent flag
* Adapt HostAuth to handle new Uri scheme
* Remove the old ambiguous "optional" code, which was allowing
some unsigned certificates, but was *also* allowing TLS to
optionally start (though not SSL, despite the UI strings.)
* Add a few unit tests to EmailContent
* Add logging and a bunch of comments to TrustManagerFactory, and a bit
of simple cleanup to make it more readable.
* Add missing conversion of SSLException->CertificateValidationException
in TLS so we get the correct certificate errors from TLS too.
* Re-enable TLS for mac.com accounts (which had a certificate problem)
Fixes bug http://b/2119755, http://b/1374780, and probably a raft of
earlier and/or external bugs about certificate problems.
Change-Id: Iaf99a8da3eaadaa4cdeec224737838b5d6813e55
* Tighten up user logging
* Send all HttpClient commands w/ watchdog to prevent
holding wakelocks too long
* Fix case in which no ping boxes are ready in which
ping loop would hang on to WakeLock indefinitely
* Release WakeLock for waits < 10 seconds, rather than
30s in SyncManager
* Improve logging of IOExceptions
* Log network status (at least until #2150976 is fixed)
Change-Id: I020b8a21c2c4f536d5b6df871f6b5c03fdc66ab8
* We were setting the timeout and heartbeat to the same time,
which could cause mistaken timeouts
* Set timeout ten seconds after the heartbeat for now, and set
an alarm a few seconds after that
Change-Id: Ic2f7b44c9626ebbdd7a8821f53f7aaf6169f62c3
I don't know the root cause of the null pointer (possibly a broken
connection earlier in the sync) but we shouldn't be crashing here.
Fixes http://b/2135743