diff options
author | Anthony Lee <anthonylee@google.com> | 2014-10-21 13:19:45 -0700 |
---|---|---|
committer | Anthony Lee <anthonylee@google.com> | 2014-10-21 13:19:45 -0700 |
commit | 8b7fd49b132abdec4d5fd6c62dbd8d9265c8303a (patch) | |
tree | febe019214527befb98c2e1cf2beed8a28362c44 /emailcommon | |
parent | 98f764fb726b07dbbb20fdd31f5b0377be627269 (diff) | |
download | android_packages_apps_Email-8b7fd49b132abdec4d5fd6c62dbd8d9265c8303a.tar.gz android_packages_apps_Email-8b7fd49b132abdec4d5fd6c62dbd8d9265c8303a.tar.bz2 android_packages_apps_Email-8b7fd49b132abdec4d5fd6c62dbd8d9265c8303a.zip |
Fix restoreBodySource key so it returns the correct value.
The previous version of this function would return the _ID value
instead of the SOURCE_MESSAGE_KEY value from the Body row.
Bug: 17720266
Change-Id: Ie4cfc988b0659892b68d31472ef0c41d4aa98c68
Diffstat (limited to 'emailcommon')
-rwxr-xr-x | emailcommon/src/com/android/emailcommon/provider/EmailContent.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/emailcommon/src/com/android/emailcommon/provider/EmailContent.java b/emailcommon/src/com/android/emailcommon/provider/EmailContent.java index 0dc87c735..28826fd85 100755 --- a/emailcommon/src/com/android/emailcommon/provider/EmailContent.java +++ b/emailcommon/src/com/android/emailcommon/provider/EmailContent.java @@ -493,9 +493,6 @@ public abstract class EmailContent { public static final int CONTENT_SOURCE_KEY_COLUMN = 4; public static final int CONTENT_QUOTED_TEXT_START_POS_COLUMN = 5; - private static final String[] PROJECTION_SOURCE_KEY = - new String[] {BaseColumns._ID, BodyColumns.SOURCE_MESSAGE_KEY}; - public long mMessageKey; public String mHtmlContent; public String mTextContent; @@ -577,7 +574,7 @@ public abstract class EmailContent { @VisibleForTesting public static long restoreBodySourceKey(Context context, long messageId) { return Utility.getFirstRowLong(context, Body.CONTENT_URI, - Body.PROJECTION_SOURCE_KEY, + new String[] {BodyColumns.SOURCE_MESSAGE_KEY}, BodyColumns.MESSAGE_KEY + "=?", new String[] {Long.toString(messageId)}, null, 0, 0L); } |