From 533093abd783572e76868485704c2eb59a13bd01 Mon Sep 17 00:00:00 2001 From: Anthony Lee Date: Fri, 25 Apr 2014 11:57:00 -0700 Subject: [PATCH] Make sure that queries against the Body table have ID columns. Performed some cleanup and updated the source key projection to include an ID to make sure that EmailMessageCursor works properly. Change-Id: I272fac474de876fdd2a08136e0ba97b3f5dc2c7e --- .../com/android/emailcommon/provider/EmailContent.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/emailcommon/src/com/android/emailcommon/provider/EmailContent.java b/emailcommon/src/com/android/emailcommon/provider/EmailContent.java index a189c9ddc..2e0749791 100755 --- a/emailcommon/src/com/android/emailcommon/provider/EmailContent.java +++ b/emailcommon/src/com/android/emailcommon/provider/EmailContent.java @@ -476,7 +476,7 @@ public abstract class EmailContent { public static final String RESPOND_RESULT_TEXT_PIPE_KEY = "EmailMessageCursor.textPipe"; public static final String[] CONTENT_PROJECTION = new String[] { - BodyColumns._ID, + BaseColumns._ID, BodyColumns.MESSAGE_KEY, BodyColumns.HTML_CONTENT, BodyColumns.TEXT_CONTENT, @@ -492,15 +492,15 @@ public abstract class EmailContent { public static final int CONTENT_QUOTED_TEXT_START_POS_COLUMN = 5; public static final String[] COMMON_PROJECTION_TEXT = new String[] { - BodyColumns._ID, BodyColumns.TEXT_CONTENT + BaseColumns._ID, BodyColumns.TEXT_CONTENT }; public static final String[] COMMON_PROJECTION_HTML = new String[] { - BodyColumns._ID, BodyColumns.HTML_CONTENT + BaseColumns._ID, BodyColumns.HTML_CONTENT }; public static final int COMMON_PROJECTION_COLUMN_TEXT = 1; private static final String[] PROJECTION_SOURCE_KEY = - new String[] { BodyColumns.SOURCE_MESSAGE_KEY }; + new String[] {BaseColumns._ID, BodyColumns.SOURCE_MESSAGE_KEY}; public long mMessageKey; public String mHtmlContent;