Reverse FLAG_INCLUDE_QUOTED_TEXT

To make it compatible with old databases.

(Follow-up to Ie7bcca23)

Bug 3162967

Change-Id: Ie3bbb5089900bb9dbd0834adbdd466fa009245f9
This commit is contained in:
Makoto Onuki 2010-11-04 16:27:44 -07:00
parent bf678771b7
commit 0e6254223a
2 changed files with 10 additions and 8 deletions

View File

@ -559,7 +559,6 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
mAddressAdapterBcc = new EmailAddressAdapter(this);
}
// TODO: is there any way to unify this with MessageView.LoadMessageTask?
private class LoadMessageTask extends AsyncTask<Void, Void, Object[]> {
private final long mMessageId;
@ -807,9 +806,9 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
}
if (includeQuotedText()) {
message.mFlags |= Message.FLAG_INCLUDE_QUOTED_TEXT;
message.mFlags &= ~Message.FLAG_NOT_INCLUDE_QUOTED_TEXT;
} else {
message.mFlags &= ~Message.FLAG_INCLUDE_QUOTED_TEXT;
message.mFlags |= Message.FLAG_NOT_INCLUDE_QUOTED_TEXT;
if (sending) {
// If we are about to send a message, and not including the original message,
// clear the related field.
@ -1485,7 +1484,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
*/
if (ACTION_EDIT_DRAFT.equals(mAction)) {
displayQuotedText(message.mTextReply, message.mHtmlReply);
setIncludeQuotedText((mDraft.mFlags & Message.FLAG_INCLUDE_QUOTED_TEXT) != 0);
setIncludeQuotedText((mDraft.mFlags & Message.FLAG_NOT_INCLUDE_QUOTED_TEXT) == 0);
}
}

View File

@ -621,10 +621,13 @@ public abstract class EmailContent {
// 8 general purpose flags (bits) that may be used at the discretion of the sync adapter
public static final int FLAG_SYNC_ADAPTER_SHIFT = 9;
public static final int FLAG_SYNC_ADAPTER_MASK = 255 << FLAG_SYNC_ADAPTER_SHIFT;
// Bit used in mFlags indicating that the outgoing message should include quoted original
// message.
public static final int FLAG_INCLUDE_QUOTED_TEXT_SHIFT = 17;
public static final int FLAG_INCLUDE_QUOTED_TEXT = 1 << FLAG_INCLUDE_QUOTED_TEXT_SHIFT;
/**
* Bit used in mFlags indicating that the outgoing message should *not* include quoted
* original message. ("Not", in order to keep compatibility with old databases)
*/
public static final int FLAG_NOT_INCLUDE_QUOTED_TEXT_SHIFT = 17;
public static final int FLAG_NOT_INCLUDE_QUOTED_TEXT
= 1 << FLAG_NOT_INCLUDE_QUOTED_TEXT_SHIFT;
public Message() {
mBaseUri = CONTENT_URI;