Commit Graph

1002 Commits

Author SHA1 Message Date
Jim Miller
6d69fb7c57 Fix 2266119: Simplify account creation strings and remove translation requirement
This removes the word "account" to eliminate the need for translation and to simplify
the use of overlays for vendors that need to customize these strings.
2009-12-02 18:58:55 -08:00
Eric Fischer
5905791775 Import revised translations. DO NOT MERGE 2009-12-02 14:56:24 -08:00
Eric Fischer
ddc69f4248 Import revised translations. DO NOT MERGE 2009-11-30 11:35:56 -08:00
Android (Google) Code Review
d457c744cd Merge change Ic1a2e5b9 into eclair
* changes:
  Fix improper constant to allow retry for sending Exchange mail
2009-11-20 13:32:59 -08:00
Marc Blank
eec04663fe Fix improper constant to allow retry for sending Exchange mail
* 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
2009-11-20 12:10:23 -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
Eric Fischer
743b143d0e Import revised translations. DO NOT MERGE
Approver: jerryw
2009-11-13 17:21:24 -08:00
Eric Fischer
bf67508d16 Import revised translations. DO NOT MERGE
Approver: jerryw
2009-11-12 19:48:23 -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
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
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
Eric Fischer
1b21ad4d4b Import corrected translations. DO NOT MERGE
Bug 2195208
2009-11-02 23:20:12 -08: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
Eric Fischer
bb17f149ab Import revised translations. DO NOT MERGE 2009-10-28 21:18:16 -07: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
Eric Fischer
ba2d6de4b7 Import revised translations. DO NOT MERGE
Approver: jerryw
2009-10-21 10:44:46 -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
Andrew Stadler
53123c2f91 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
2009-10-14 12:41:05 -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
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
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
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
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
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
Mike Cleron
479b22a2f8 Make multiselect buttons update when the list state changes 2009-10-09 13:19:26 -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
Eric Fischer
b634dbf618 am 20b3ba23: (-s ours) Import revised translations. DO NOT MERGE
Merge commit '20b3ba2303da8b790afedf84bd20f370bbdf703b' into eclair

* commit '20b3ba2303da8b790afedf84bd20f370bbdf703b':
  Import revised translations.  DO NOT MERGE
2009-10-08 10:43:54 -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
Andrew Stadler
dfee3ff278 Fix a crash when you scroll MessageList to junk @ bottom
* Add missing reference to spam/junk folder icon
* Unit tests for Utility.FolderProperties.getIconIds()

Fixes http://b/issue?id=2173907
2009-10-07 16:30:41 -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
Android (Google) Code Review
25920f67e6 Merge change I7a3482fd into eclair
* changes:
  Handle IMAP empty bodies more safely
2009-10-07 17:48:47 -04: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
Android (Google) Code Review
1cd5e5f03c Merge change I0aba41f9 into eclair
* changes:
  Import revised translations.   DO NOT MERGE
2009-10-07 14:36:57 -04: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
Eric Fischer
0aba41f98b Import revised translations. DO NOT MERGE
Approver: jerryw
2009-10-06 16:52:58 -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
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