Commit Graph

774 Commits

Author SHA1 Message Date
Marc Blank
c29e435eb3 Don't delete referenced messages from the Exchange server
* 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
2009-12-07 21:30:59 -08:00
Vasu Nori
b720ed3183 revert previously submitted CL 34143.
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.
2009-12-03 18:32:58 -08:00
Android (Google) Code Review
98796942ea Merge change I8e09bde5 into eclair-mr2
* changes:
  change BEFORE triggers to AFTER triggers - to make them work with sqlite 3.6.20 and beyond
2009-12-02 14:42:46 -08:00
satok
4cb25d93a2 Save the state of checkboxes when orientation is changed
BUG: 2239516

* Add tests for save/restore Instance State
2009-12-01 15:41:10 +09:00
Vasu Nori
8e09bde568 change BEFORE triggers to AFTER triggers - to make them work with sqlite 3.6.20 and beyond 2009-11-25 15:38:42 -08:00
Marc Blank
6ba40085d7 am 863e6c40: Handle "send outgoing messages" properly for combined Outbox
Merge commit '863e6c40202fe804d92a263809da74ec1e904e66' into eclair-mr2

* commit '863e6c40202fe804d92a263809da74ec1e904e66':
  Handle "send outgoing messages" properly for combined Outbox
2009-11-20 09:56:03 -08:00
Marc Blank
863e6c4020 Handle "send outgoing messages" properly for combined Outbox
* 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
2009-11-20 09:46:35 -08:00
Marc Blank
bdb28c1644 Fix #2267475 (NPE when changing incoming settings for EAS)
* 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
2009-11-19 09:01:06 -08:00
Android (Google) Code Review
6b93f61eea Merge change Ib35bb866 into eclair-mr2
* changes:
  Don't allow "trash" to be synced (Fixes #2116463)
2009-11-19 08:57:39 -08:00
Marc Blank
6daaf76459 Don't allow "trash" to be synced (Fixes #2116463)
Change-Id: Ib35bb86641b473194fea32b55db328a44de1c67b
2009-11-18 17:20:44 -08:00
Dan Egnor
2da2e4632d Change android.text.util.Regex to com.android.common.Patterns 2009-11-18 12:11:55 -08:00
Elliott Hughes
b1487a2030 DO NOT MERGE: Back-port 2249953 fix (for email unbundling).
Original check-in comment:
Move the org.kxml2.wap.Wbxml class into the EAS code, the only user.

Dr No approval: danfuzz
2009-11-16 13:26:18 -08:00
Marc Blank
83b67e6198 Fix #2251837; better response w/ security req'd. DO NOT MERGE
* 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
2009-11-11 14:40:35 -08:00
Marc Blank
29935abb1c Fix #2251837; better response when provisioning is required.
* 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
2009-11-10 16:29:10 -08:00
Marc Blank
151ebde5d1 Allow sync data via the chunked transfer encoding DO NOT MERGE
* 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
2009-11-04 18:11:24 -08:00
Marc Blank
038be0fc4d am c5ec3d0b: Merge change I2eee4ddc into eclair
Merge commit 'c5ec3d0bce03de10c4bb1bc5cf013494c6d62947' into eclair-mr2

* commit 'c5ec3d0bce03de10c4bb1bc5cf013494c6d62947':
  Improved fix for #2189704 (sync loss)
2009-11-04 14:53:35 -08:00
Android (Google) Code Review
c5ec3d0bce Merge change I2eee4ddc into eclair
* changes:
  Improved fix for #2189704 (sync loss)
2009-11-04 17:45:11 -05:00
Marc Blank
d676ab6a98 Improved fix for #2189704 (sync loss)
* 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
2009-11-03 18:11:02 -08:00
Marc Blank
ccd29c33ed Allow sync data to arrive via the chunked transfer encoding.
* 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
2009-11-01 13:48:31 -08:00
Marc Blank
e7965e975f am 1e1d7cb1: Merge change Ie2804ddc into eclair
Merge commit '1e1d7cb189e7ea7164d1335539d68d3d3ca8c0e5' into eclair-mr2

* commit '1e1d7cb189e7ea7164d1335539d68d3d3ca8c0e5':
  Fix #2225869 (Regression in attachment loading / Exchange 2003)
2009-10-30 14:33:58 -07:00
Android (Google) Code Review
1e1d7cb189 Merge change Ie2804ddc into eclair
* changes:
  Fix #2225869 (Regression in attachment loading / Exchange 2003)
2009-10-30 17:26:46 -04:00
Android (Google) Code Review
68942b93a4 Merge change I9733dc5d into eclair
* changes:
  Fix folder deletion; support folder rename (#2118439) DO NOT MERGE
2009-10-30 13:54:55 -04:00
Marc Blank
05dfc20853 Fix #2225869 (Regression in attachment loading / Exchange 2003)
* 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
2009-10-29 20:10:46 -07:00
Marc Blank
94d2e99581 Fix folder deletion; support folder rename (#2118439) DO NOT MERGE
* 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
2009-10-29 12:19:57 -07:00
Android (Google) Code Review
0911d6290f Merge change Id69cee9b into eclair-mr2
* changes:
  Fix folder deletion; add support for folder rename (#2118439)
2009-10-29 15:06:56 -04:00
Marc Blank
d2cc832782 Fix folder deletion; add support for folder rename (#2118439)
* 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
2009-10-29 12:03:39 -07:00
Android (Google) Code Review
9abd1bf9da Merge change I21052e28 into eclair-mr2
* changes:
  Controller: modify the test for "attachment already loaded".
2009-10-29 09:34:43 -04:00
Mihai Preda
6bb7c7248a MessageView: disable reply&forward for Trash messages.
Bug 2170118
2009-10-29 14:11:10 +01:00
Android (Google) Code Review
0054c1a9e6 Merge change If12d0e7c into eclair
* changes:
  Go to combined inbox on notify for 2+ accounts (#2147265) DO NOT MERGE
2009-10-28 13:56:10 -04:00
Android (Google) Code Review
2533132c84 Merge change Ic29d3eac into eclair
* changes:
  Server validates even though server address is wrong DO NOT MERGE
2009-10-28 13:55:43 -04:00
Marc Blank
5d4bb79044 Go to combined inbox on notify for 2+ accounts (#2147265) DO NOT MERGE
* 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
2009-10-28 08:57:45 -07:00
Marc Blank
e53de6985a Server validates even though server address is wrong DO NOT MERGE
* Fixes #2173664
* Make sure that not only is the OPTIONS command accepted, but that
  the server reports EAS versions and commands

Change-Id: Ic29d3eacfdc54d107600afc443964a1e8b3d5e59
2009-10-28 08:53:57 -07:00
Marc Blank
ea5b93d9b8 Handle moreAvailable true w/o changes (#2189704) DO NOT MERGE
* 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
2009-10-22 14:49:26 -07:00
Mihai Preda
9ef6f645f5 Controller: modify the test for "attachment already loaded".
Bug 2192510.

update unit test.
2009-10-22 19:27:59 +02:00
Android (Google) Code Review
da08e3bcb6 Merge change I218079f2 into eclair-mr2
* changes:
  Fix timing-dependent crash in Medium tests (#2202726)
2009-10-21 18:44:47 -04:00
Marc Blank
d16b4b921f Go to combined inbox from notification for 2+ accounts (#2147265)
* 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
2009-10-21 13:51:16 -07:00
Marc Blank
38203a3fde Fix timing-dependent crash in Medium tests (#2202726)
Change-Id: I218079f24f1ce08d770624d1272e1d9a46c1be26
2009-10-21 12:41:57 -07:00
satok
3045bb967f Add view of all counts in AccountFolderList
BUG: 2201097
2009-10-21 07:19:10 +09:00
Android (Google) Code Review
528fa1bbca Merge change Icabbe5fe into eclair-mr2
* changes:
  Fix #2159410 (side-effect of unexpected account deletion)
2009-10-20 15:01:54 -04:00
Marc Blank
c1b8efad50 Fix #2159410 (side-effect of unexpected account deletion)
Change-Id: Icabbe5fe5c417ff72b542eff7a54c658814d482b
2009-10-20 10:51:08 -07:00
Marc Blank
367963639d Fix SQL for upgrade from ver 6 to ver 7 of Email database
Fixes #2196917

Change-Id: Ia403e50e9ec4ea553d38ded656bba769a4a4dd18
2009-10-20 10:11:26 -07:00
satok
4bc81bb286 Fix build breakage 2009-10-20 04:19:21 +09:00
Android (Google) Code Review
ba78d18f59 Merge change I23b7f225 into eclair-mr2
* changes:
  Clean up appearance of unread counters
2009-10-19 14:20:01 -04:00
satok
fa368b50d6 Clean up appearance of unread counters
BUG: 2161746
2009-10-20 03:18:27 +09:00
Marc Blank
3a88e2c35c am 55a97fc3: Fix attachment loading with "accept certificates" checked
Merge commit '55a97fc360ac549631af3aa3aad9833812674562' into eclair-mr2

* commit '55a97fc360ac549631af3aa3aad9833812674562':
  Fix attachment loading with "accept certificates" checked
2009-10-19 10:40:15 -07:00
Marc Blank
55a97fc360 Fix attachment loading with "accept certificates" checked
* Fixes #2191778 (P1/S1)
* Attachment retrieval wasn't using newer code to create its
  HttpClient.
* Fix is simple, extremely safe

Change-Id: I65be27decae8719bbad8ac7dce1c1164de4371a5
2009-10-19 10:34:10 -07:00
Android (Google) Code Review
dc9bc35bb1 Merge change Idef455f3 into eclair-mr2
* changes:
  Handle case of moreAvailable true with no changes (#2189704)
2009-10-15 16:28:19 -04:00
Marc Blank
288bb26ab8 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
2009-10-15 12:11:39 -07:00
Android (Google) Code Review
f095e9df5a Merge change Ib53e4411 into eclair-mr2
* changes:
  Clear out orphaned messages in updates/deletes tables
2009-10-15 15:03:41 -04:00
Marc Blank
ef83299b99 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
2009-10-15 10:58:00 -07:00