From d4a06f409d08a61bd387ab2e2f37eca519f10010 Mon Sep 17 00:00:00 2001 From: Tony Mantler Date: Mon, 30 Sep 2013 15:32:42 -0700 Subject: [PATCH] Only return messages that are unread and unseen for an unseen query b/10970849 Change-Id: I23d40fc39987fab35521f1dd75f4631f1fae16d5 --- src/com/android/email/provider/EmailProvider.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index 45ed61f2b..2b5f63e4c 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -2577,6 +2577,7 @@ public class EmailProvider extends ContentProvider { Message.MAILBOX_KEY + "=? "); if (unseenOnly) { sb.append("AND ").append(MessageColumns.FLAG_SEEN).append(" = 0 "); + sb.append("AND ").append(MessageColumns.FLAG_READ).append(" = 0 "); } sb.append("ORDER BY " + MessageColumns.TIMESTAMP + " DESC "); sb.append("LIMIT " + UIProvider.CONVERSATION_PROJECTION_QUERY_CURSOR_WINDOW_LIMT); @@ -2604,6 +2605,7 @@ public class EmailProvider extends ContentProvider { if (isCombinedMailbox(mailboxId)) { if (unseenOnly) { sb.append(MessageColumns.FLAG_SEEN).append("=0 AND "); + sb.append(MessageColumns.FLAG_READ).append("=0 AND "); } selectionArgs = null; } else {