am 802bf1b4: Ignore Messsages With No Timestamp

* commit '802bf1b4a7e36caa84d790198abc8421873b821c':
  Ignore Messsages With No Timestamp
This commit is contained in:
Alon Albert 2013-11-08 16:57:25 -08:00 committed by Android Git Automerger
commit 0a4debe0a5

View File

@ -372,10 +372,12 @@ public class ImapService extends Service {
endDate = System.currentTimeMillis() - FULL_SYNC_WINDOW_MILLIS;
Cursor localOldestCursor = null;
try {
// b/11520812 Ignore message with timestamp = 0 (which includes NULL)
localOldestCursor = resolver.query(EmailContent.Message.CONTENT_URI,
OldestTimestampInfo.PROJECTION,
EmailContent.MessageColumns.ACCOUNT_KEY + "=?" + " AND " +
MessageColumns.MAILBOX_KEY + "=?",
MessageColumns.MAILBOX_KEY + "=? AND " +
MessageColumns.TIMESTAMP + "!=0",
new String[] {String.valueOf(account.mId), String.valueOf(mailbox.mId)},
null);
if (localOldestCursor != null && localOldestCursor.moveToFirst()) {