Commit Graph

719 Commits

Author SHA1 Message Date
Andrew Stadler
e3e02adac6 am dee4e253: 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
2009-10-14 07:37:12 -07:00
Andrew Stadler
dee4e25320 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
2009-10-13 21:09:40 -07:00
Marc Blank
7cfda60b2b am 4e424a33: Merge change Ie093215f into eclair
Merge commit '4e424a33c29446d750790e360e43fb7c83ec0c6f' into eclair-mr2

* commit '4e424a33c29446d750790e360e43fb7c83ec0c6f':
  Add truncation at 100k (EAS 2.5) and 200k (EAS 12) (#2184807)
2009-10-13 14:46:04 -07:00
Android (Google) Code Review
4e424a33c2 Merge change Ie093215f into eclair
* changes:
  Add truncation at 100k (EAS 2.5) and 200k (EAS 12) (#2184807)
2009-10-13 17:39:59 -04:00
Andrew Stadler
b7c67a0124 am 754240bc: Fix race condition in testMultiple()
Merge commit '754240bcf3ccc8492a50ba9ee8056b34f6e4e8d0' into eclair-mr2

* commit '754240bcf3ccc8492a50ba9ee8056b34f6e4e8d0':
  Fix race condition in testMultiple()
2009-10-13 12:43:20 -07:00
Marc Blank
5fd81cad4c Add truncation at 100k (EAS 2.5) and 200k (EAS 12) (#2184807)
* Prevents OOM errors with huge message bodies

Change-Id: Ie093215f96a514b3a1bcd31aa1f5957d1ada7719
2009-10-13 12:06:47 -07:00
Andrew Stadler
754240bcf3 Fix race condition in testMultiple()
* 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
2009-10-13 12:02:46 -07:00
Mihai Preda
2bc47f24a4 MessageView: use FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET when viewing attachments.
Bug 2180995.
2009-10-13 12:53:16 +02:00
Marc Blank
255dba84f1 am 2c74ee56: Prevent EmailAddressAdapter from leaking cursors; load in bg
Merge commit '2c74ee56a44e7a43bda14e88fd2b571fd88952fe' into eclair-mr2

* commit '2c74ee56a44e7a43bda14e88fd2b571fd88952fe':
  Prevent EmailAddressAdapter from leaking cursors; load in bg
2009-10-12 14:02:19 -07:00
Marc Blank
2c74ee56a4 Prevent EmailAddressAdapter from leaking cursors; load in bg
* 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
2009-10-12 13:54:05 -07:00
Mihai Preda
89966059c9 am 1a377f09: 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 '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.
2009-10-12 11:42:13 -07:00
Mihai Preda
1a377f096f MessageCompose: corretly set initial mSourceMessageProcessed=true for the cases where there's no source message, to avoid duplicated email addresses on orientation change.
Bug 2180955.
2009-10-12 13:39:42 +02:00
Andrew Stadler
d5e7afa1eb Remove obsolete resources & code
* FolderMessageList
* Fat title bar (remnants)
* Drawables

Bug # http://b/2071133
2009-10-11 22:09:39 -07:00
Marc Blank
8be9b8937b am ea878be1: Make sure we hold WakeLock during mail sending (fixes #2180551)
Merge commit 'ea878be11729cd793d9183fc264118241cd5a5b6' into eclair-mr2

* commit 'ea878be11729cd793d9183fc264118241cd5a5b6':
  Make sure we hold WakeLock during mail sending (fixes #2180551)
2009-10-10 22:59:05 -07:00
Marc Blank
ea878be117 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
2009-10-10 22:54:24 -07:00
Android (Google) Code Review
0fd132d26c Merge change I5de51a43 into eclair-mr2
* changes:
  Allow photo changes to be uploaded to Exchange (fixes #2179082)
2009-10-09 21:57:55 -04:00
Marc Blank
59da135e15 Allow photo changes to be uploaded to Exchange (fixes #2179082)
Change-Id: I5de51a4313c43dbe4e3d12d4d0e11b20adedaa8f
2009-10-09 14:34:53 -07:00
Mike Cleron
4cce00d6c4 am 479b22a2: Make multiselect buttons update when the list state changes
Merge commit '479b22a2f8966b63789c89e878b615ebd53708c0' into eclair-mr2

* commit '479b22a2f8966b63789c89e878b615ebd53708c0':
  Make multiselect buttons update when the list state changes
2009-10-09 13:28:10 -07:00
Mike Cleron
479b22a2f8 Make multiselect buttons update when the list state changes 2009-10-09 13:19:26 -07:00
Marc Blank
7a8bbfe0b0 am 4b59cfc8: Fix problem with timeouts and sending attachments (#2178288)
Merge commit '4b59cfc8ed4054ffb5ad85cea8aba94a430cc2cb' into eclair-mr2

* commit '4b59cfc8ed4054ffb5ad85cea8aba94a430cc2cb':
  Fix problem with timeouts and sending attachments (#2178288)
2009-10-09 12:43:01 -07:00
Marc Blank
4b59cfc8ed 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
2009-10-09 11:20:52 -07:00
Mihai Preda
affa5660e7 MessageView: UI change prev/next arrows.
Bug: 2149187

The prev/next buttons now each extends half the width, and are on black background.
2009-10-09 14:17:49 +02:00
Android (Google) Code Review
676ea183bd Merge change I15dccd1f into eclair-mr2
* changes:
  Server validates even though server address is wrong
2009-10-08 11:15:46 -04:00
Android (Google) Code Review
ff0c1f6313 Merge change Ic2d782c1 into eclair-mr2
* changes:
  Add checks to prevent duplicate service starts (fixes #2099830)
2009-10-08 11:12:08 -04:00
Mihai Preda
ba0b734043 am 73032f46: Email: exit AsyncTask.onPostExecute() if the result is null or isCancelled().
Merge commit '73032f4657a77f733a348fe3c2c1fa783d335ff0' into eclair-mr2

* commit '73032f4657a77f733a348fe3c2c1fa783d335ff0':
  Email: exit AsyncTask.onPostExecute() if the result is null or isCancelled().
2009-10-08 06:13:27 -07:00
Mihai Preda
73032f4657 Email: exit AsyncTask.onPostExecute() if the result is null or isCancelled().
Bug: 2167479
2009-10-08 11:58:45 +02:00
Marc Blank
8063528202 Server validates even though server address is wrong
* Fixes #2173664
* Make sure that not only is the OPTIONS command accepted, but that
  the server reports EAS versions and commands

Change-Id: I15dccd1fbd06aa3cf2ba8fbbf72d20918ec44617
2009-10-07 17:10:46 -07:00
Andrew Stadler
ec7bdde6a5 am 5b26bbe4: Switch QuickContact presentation from MEDIUM to LARGE.
Merge commit '5b26bbe4551ca095697f07eca7d09b24573cba11' into eclair-mr2

* commit '5b26bbe4551ca095697f07eca7d09b24573cba11':
  Switch QuickContact presentation from MEDIUM to LARGE.
2009-10-07 16:04:47 -07:00
Andrew Stadler
5b26bbe455 Switch QuickContact presentation from MEDIUM to LARGE.
Bug # http://b/issue?id=2170878
2009-10-07 15:18:13 -07:00
Andrew Stadler
9331d413b2 am 25920f67: Merge change I7a3482fd into eclair
Merge commit '25920f67e6ff67ee74637360aff072483b454a42' into eclair-mr2

* commit '25920f67e6ff67ee74637360aff072483b454a42':
  Handle IMAP empty bodies more safely
2009-10-07 14:59:45 -07:00
Andrew Stadler
b6756688b1 Handle IMAP empty bodies more safely
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
2009-10-07 11:42:27 -07:00
Marc Blank
572f6058f4 Add checks to prevent duplicate service starts (fixes #2099830)
Change-Id: Ic2d782c1b36459212f7f3441202220353eccd776
2009-10-07 09:49:21 -07:00
Fred Quintana
df002ccfac am 2c79efd8: Merge change I303304ab into eclair
Merge commit '2c79efd82736c4fd9a8351130b9410e9fb23f7f7' into eclair-mr2

* commit '2c79efd82736c4fd9a8351130b9410e9fb23f7f7':
  changes from Sync Manager API Review: bug 2164262
2009-10-06 22:55:01 -07:00
Marc Blank
a39b643d79 am e1b5e857: Merge change I2b0e3b10 into eclair
Merge commit 'e1b5e8574c86e4dcc184f1b3a4db352c9a631d99' into eclair-mr2

* commit 'e1b5e8574c86e4dcc184f1b3a4db352c9a631d99':
  Help with another push inconsistency edge case (#2131432)
2009-10-06 22:54:58 -07:00
Android (Google) Code Review
2c79efd827 Merge change I303304ab into eclair
* changes:
  changes from Sync Manager API Review: bug 2164262
2009-10-07 01:49:02 -04:00
Fred Quintana
84c975033d changes from Sync Manager API Review: bug 2164262 2009-10-06 17:19:32 -07:00
Android (Google) Code Review
e1b5e8574c Merge change I2b0e3b10 into eclair
* changes:
  Help with another push inconsistency edge case (#2131432)
2009-10-06 20:16:52 -04:00
Andrew Stadler
aa32726d8b am eb7752bf: Fix back-to-back message-id bugs
Merge commit 'eb7752bf695b2a93854e0bb89ddbbc2236bb9aea' into eclair-mr2

* commit 'eb7752bf695b2a93854e0bb89ddbbc2236bb9aea':
  Fix back-to-back message-id bugs
2009-10-06 14:36:51 -07:00
Mihai Preda
37aa27440b am 85d718cb: MessageCompose: quote plain-text body if available, otherwise quote HTML body.
Merge commit '85d718cb0735de9069673fbf9834fa64459c2178' into eclair-mr2

* commit '85d718cb0735de9069673fbf9834fa64459c2178':
  MessageCompose: quote plain-text body if available, otherwise quote HTML body.
2009-10-06 14:36:47 -07:00
Andrew Stadler
eb7752bf69 Fix back-to-back message-id bugs
* 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
2009-10-06 14:20:09 -07:00
Marc Blank
ffef9d9fe8 Help with another push inconsistency edge case (#2131432)
* 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
2009-10-06 13:46:09 -07:00
Marc Blank
25c7efc8eb Use constants for elements in projections.
Change-Id: I304e03da4419b4e7166189e08e4ce947c5f74383
2009-10-06 08:30:30 -07:00
Mihai Preda
85d718cb07 MessageCompose: quote plain-text body if available, otherwise quote HTML body.
Bug 2082852.
2009-10-06 16:50:54 +02:00
Mihai Preda
1ef86a50f8 MessageView: scroll to (0,0) on message change.
Bug 2156934.
2009-10-06 16:36:44 +02:00
Android (Google) Code Review
d493ba257a Merge change Ie90b74aa into eclair
* changes:
  Avoid NPE at onRefresh in MessageList
2009-10-05 22:31:42 -04:00
Android (Google) Code Review
8647be095a Merge change Id1c0bc24 into eclair
* changes:
  Correct issue with mail change parsing (fixes #2165649)
2009-10-05 16:59:07 -04:00
Marc Blank
d0848056f1 Correct issue with mail change parsing (fixes #2165649)
* 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
2009-10-05 13:58:19 -07:00
Fred Quintana
794b7e9258 account manager api review changes 2009-10-05 11:29:01 -07:00
Android (Google) Code Review
888ea64f86 Merge change I26bb7b8b into eclair
* changes:
  Handle change from push to other intervals properly (#2165032)
2009-10-05 14:07:09 -04:00
Marc Blank
86765f3463 Handle change from push to other intervals properly (#2165032)
* Make sure eas account mailbox is also changed to the new sync interval

Change-Id: I26bb7b8b740c09f4c2cf848c33c9b642b9776fcc
2009-10-05 11:05:37 -07:00