Fix loading the quoted text when editing draft.

Bug 2140036.

Only load the reply fields for an edit-draft situation.

Change-Id: I851e3851ab595a0a2e6829a3bf3845ae576f1ba7
This commit is contained in:
Mihai Preda 2009-09-23 16:50:31 +02:00 committed by Marc Blank
parent e1145d1739
commit 7a59191bf1

View File

@ -116,17 +116,11 @@ public class EmailSyncAdapter extends AbstractSyncAdapter {
msg.mTo = Address.pack(Address.parse(getValue()));
break;
case Tags.EMAIL_FROM:
String from = getValue();
String sender = from;
int q = from.indexOf('\"');
if (q >= 0) {
int qq = from.indexOf('\"', q + 1);
if (qq > 0) {
sender = from.substring(q + 1, qq);
}
Address[] froms = Address.parse(getValue());
if (froms != null && froms.length > 0) {
msg.mDisplayName = froms[0].toFriendly();
}
msg.mDisplayName = sender;
msg.mFrom = Address.pack(Address.parse(from));
msg.mFrom = Address.pack(froms);
break;
case Tags.EMAIL_CC:
msg.mCc = Address.pack(Address.parse(getValue()));