replicant-packages_apps_Email/tests/src/com/android/email/mail/internet
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
..
EmailHtmlUtilTest.java eclair snapshot 2009-11-12 18:46:09 -08:00
MimeBodyPartTest.java auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:48 -07:00
MimeHeaderUnitTests.java AI 149328: Add extended header support to MimeMessage, MimeBodyPart, and LocalStore. 2009-05-27 19:03:34 -07:00
MimeMessageTest.java Follow-up to MimeMessage efficiency improvements. 2010-03-10 16:42:49 -08:00
MimeUtilityTest.java Trim the mime type portion of Content-Type. 2010-01-21 11:46:20 -08:00