Commit Graph

32 Commits

Author SHA1 Message Date
Makoto Onuki 7d3519151a Tests for IMAP FETCH
Adding regression test for the new IMAP parser.

Change-Id: Iac7f5c022e44ca5f06f735e145af15cc459eb61f
2010-05-18 10:48:11 -07:00
Makoto Onuki 9c9e757917 Add static method to get temp dir in Email.
I need to be able to get the temp dir from anywhere without Context
for the new IMAP parser.

Change-Id: I3bf7d34059399a8253c0760ebc392804ea434412
2010-05-13 18:27:34 -07:00
Makoto Onuki b3f7dd0169 Clean up member variables.
- Fix misnomered fields.  (e.g. static mMember -> static sMember)
- Reduce visibility.  (e.g. mark as private)
- Mark final / static if possible.

Note it's on master.

There's a lot more cleanup oppotunities in the activities, but they're going
to go through a major overhaul, so I didn't bother.

Change-Id: I3fde73ba5f1f9ff675fff07c510e1e49521dde42
2010-05-11 17:06:37 -07:00
Makoto Onuki 29491840e6 Merge "Cleanup: Add @Override" into froyo-plus-aosp 2010-05-10 11:29:51 -07:00
Makoto Onuki 165e8bfe7a Cleanup: Add @Override
(Note it's for froyo-plus-asop)

Change-Id: Ic4211c08586e33c44d5d6267c0c9d37f8c7cdc85
2010-05-07 15:28:26 -07:00
Makoto Onuki e46ac1a61f Cleanup imports.
(Note it's for froyo-plus-asop)

Change-Id: Ia5b771cd41099ab486ba2e556b441fc7c0affe5f
2010-05-07 14:33:44 -07:00
Doug Zongker 6cec1104fe relocate android.util.base64.* -> android.util.*
b/2553469 - API REVIEW: android.util.base64

Change-Id: I5394427a8e2c94b87ca45a533e417f7088a69f8f
2010-03-29 13:23:39 -07:00
Andrew Stadler dfd53b0e82 Follow-up to MimeMessage efficiency improvements.
I missed a case where message-id should not be set locally, which is
the case where the Mime parser clears all headers *and* does not find
a message-id.  The parsed MimeMessage should accurately reflect this.

In the old code, the local id was created at construction time and then
immediately discarded by the parser (calling headers.clear()).

In the new code, I was generating a message-id any time I couldn't find
one.  Now, when explicitly cleared or removed, I set a boolean to inhibit
automatic generation of a new one.

I also missed the fact that a missing message-id no longer throws an
exception, it simply returns null, and so I changed the code that was
catching that exception to simply check for null.

(Note:  Clearly, modeling of legacy behavior is becoming annoying here;
It would be better to do away with all of the automatic logic, and simply
generate message-id locally when appropriate:  On locally-generated
messages.  I don't want to touch this for the current release, but I left
a note in the code to this effect.)

Bug: 2504774
Change-Id: Ibfcbd2363c7ae39ee6d44e4c3295f88258cb4945
2010-03-10 16:42:49 -08:00
Andrew Stadler 44552da606 Reduce memory overhead in Message and MimeMessage
Message and MimeMessage were creating a lot of unnecessary sub-objects
even when not needed, so do a bunch of lazy initialization.  This should
raise the bar on the size of gigantic inboxes giving us trouble.

* Specific optimizations:
  * Replace date formatter with a shared static
  * lazy create mHeader (ArrayList)
  * lazy create mFlags (HashSet)
  * optimize MimeHeader fields class
  * lazy create local message-ID (expensive-to-make uuid String)
  * make message-id string less expensive to create
* Other cleanups:
  * add some override annotations
  * privatize some members
  * update a fragile test (not a deep fix, it's still fragile)

Side effect, should be faster too.

Bug: 2357564
Bug: 2093422
Change-Id: I8a873879d402e2662339d5398ad0b15da6e580e9
2010-03-09 20:30:47 -08:00
Doug Zongker 33c972e0c6 use the framework Base64 instead of android-common
Change-Id: Ib4f75f66fe8acb1bb5de614bb10e8c938b1d27ef
2010-02-16 09:10:18 -08:00
Doug Zongker 1a67f06829 use platform common Base64InputStream
Change-Id: Iebdaf61cd2183c20362052ec39122bf42b23c7b9
2010-02-12 10:03:49 -08:00
Doug Zongker ba714999f2 finish replacing Email's base64 implementation with android-common
Change-Id: I19adbbb884311d70073e9f7a961aa6808ac0dfb4
2010-02-11 14:47:04 -08:00
Doug Zongker f44a40cda1 replace Email's private base64 class with one from android-common
Convert all usages of com.android.email.codec.binary.Base64 to use
com.android.common.Base64 instead, except for Base64OutputStream
(which doesn't exist in android-common yet).

Change-Id: I339a1f451245138187080c7444fcabef8d13f8aa
2010-02-08 20:26:02 -08:00
Patrick Horn 2517a3dfd1 Trim the mime type portion of Content-Type.
Fixes parsing of Content-Type headers like "text/plain ; charset=iso-8859-1"
Added unit tests for whitespace and the charset parameter
2010-01-21 11:46:20 -08:00
Jean-Baptiste Queru 56e48981f0 eclair snapshot 2009-11-12 18:46:09 -08:00
Mihai Preda 0dff228dc7 AI 149714: Download inline images for viewing if necessary and don't
delete attachment cache files if these are inline images.
  The purpose of original logic of loadAttachmnet() is to keep
  at most one attachment cache, probably to limit the size of
  cached file.  But it also purges all inline images.
  Integrates CL 149551 from DocomoEmail.
  BUG=1884385,1860250

Automated import of CL 149714
2009-06-10 10:48:32 -07:00
Mihai Preda 7403a54738 AI 149664: Move escapeChar from MessageView to EmailHtmlUtil.
Integrate CL 148437 from DocomoEmail.
  BUG=1860250

Automated import of CL 149664
2009-06-08 11:21:18 -07:00
Mihai Preda ca5089efb8 AI 149564: Escape special characters such as '<>&' in text/plain for display in WebView.
Integrate CL 144586,145919 from imode.
  Remove the Emoji escaping/workaround for WebView.
  Also integrate MimeHeader.java from CL 143064 from imode.
  BUG=1785319,1860250

Automated import of CL 149564
2009-06-04 09:39:24 -07:00
Mihai Preda 7436601fae AI 149523: Correctly display inline images in Reply and Forward messages.
Integrates CL 148436, 148515, 148833 from imode email.
  BUG=1814789,1860250

Automated import of CL 149523
2009-06-03 06:44:47 -07:00
Tadashi Takaoka a8884b9b72 AI 149328: Add extended header support to MimeMessage, MimeBodyPart, and LocalStore.
This extension is necessary to support some vendor specific
  extended header, such as X-NoRtn-Addr of i-mode.net mail.
  This change will update LocalStore database version to 24.
  And it should be consistent between donutburger Email and DocomoEmail.
  BUG=1741969

Automated import of CL 149328
2009-05-27 19:03:34 -07:00
Andy Stadler 615fcaf337 AI 148378: Allow store to create BinaryTempFileBody from a preexisting file
instead for forcing a copy via input stream.
  BUG=1807499

Automated import of CL 148378
2009-05-06 17:54:14 -07:00
Andy Stadler 843125b98a AI 148300: Reduce memory waste in getTextFromPart(), and improve error handling.
Fix NPE's in loadMessageForViewBodyAvailable().
  BUG=1831272

Automated import of CL 148300
2009-05-05 10:26:55 -07:00
Andy Stadler d8cbeaf7ae AI 148098: Manual merge CL 148086 to fix additional problems with non-ASCII chars
in address fields.
  BUG=1676634

Automated import of CL 148098
2009-04-30 10:18:00 -07:00
Andy Stadler 7dbeb7d91c Automated import from //branches/donutburger/...@141237,141237 2009-03-24 19:53:32 -07:00
The Android Open Source Project 3469902379 auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:48 -07:00
The Android Open Source Project 3b85e2c2b5 auto import from //branches/cupcake_rel/...@138607 2009-03-13 13:04:24 -07:00
The Android Open Source Project 96c5af40d6 auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
The Android Open Source Project 8c2158a5eb auto import from //depot/cupcake/@135843 2009-03-03 18:28:50 -08:00
The Android Open Source Project f7ae27b973 auto import from //branches/cupcake/...@130745 2009-02-10 15:44:04 -08:00
The Android Open Source Project b957c79556 auto import from //branches/cupcake/...@126645 2009-01-15 16:12:13 -08:00
The Android Open Source Project 687f9962d7 Code drop from //branches/cupcake/...@124589 2008-12-17 18:05:56 -08:00
The Android Open Source Project 8978aac197 Initial Contribution 2008-10-21 07:00:00 -07:00