am 7a59191b: Fix loading the quoted text when editing draft.

Merge commit '7a59191bf1089ec2b89128406637c2094077cbce' into eclair-plus-aosp

* commit '7a59191bf1089ec2b89128406637c2094077cbce':
  Fix loading the quoted text when editing draft.
This commit is contained in:
Mihai Preda 2009-09-24 12:27:01 -07:00 committed by Android Git Automerger
commit 4666cabdfc

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()));