diff options
author | Scott Kennedy <skennedy@google.com> | 2013-02-06 14:51:01 -0800 |
---|---|---|
committer | Scott Kennedy <skennedy@google.com> | 2013-02-06 15:20:46 -0800 |
commit | 384b8de1a1e18b29fe392151b06ce6fbe07be4bd (patch) | |
tree | e1cd474ba4eafc141bc819c5d8bbe64a7cac2e67 /tests/src/com/android/mail/compose/ComposeActivityTest.java | |
parent | d82a31f04f2a4cce27c8023d5330ff13aad198b0 (diff) | |
download | android_packages_apps_UnifiedEmail-384b8de1a1e18b29fe392151b06ce6fbe07be4bd.tar.gz android_packages_apps_UnifiedEmail-384b8de1a1e18b29fe392151b06ce6fbe07be4bd.tar.bz2 android_packages_apps_UnifiedEmail-384b8de1a1e18b29fe392151b06ce6fbe07be4bd.zip |
Cache column name/indexes so we can use getColumnIndex()
MatrixCursor doesn't do this, so we need to add our own cache.
Change-Id: Ia5ffd31f54a2a335f495df5e0d1a0886ee08c14b
Diffstat (limited to 'tests/src/com/android/mail/compose/ComposeActivityTest.java')
-rw-r--r-- | tests/src/com/android/mail/compose/ComposeActivityTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/src/com/android/mail/compose/ComposeActivityTest.java b/tests/src/com/android/mail/compose/ComposeActivityTest.java index 226ea0e33..c6dce50ab 100644 --- a/tests/src/com/android/mail/compose/ComposeActivityTest.java +++ b/tests/src/com/android/mail/compose/ComposeActivityTest.java @@ -31,6 +31,7 @@ import com.android.mail.providers.Message; import com.android.mail.providers.ReplyFromAccount; import com.android.mail.providers.UIProvider; import com.android.mail.utils.AccountUtils; +import com.android.mail.utils.MatrixCursorWithCachedColumns; import org.json.JSONArray; import org.json.JSONException; @@ -376,8 +377,8 @@ public class ComposeActivityTest extends ActivityInstrumentationTestCase2<Compos }); } - private Message getRefMessageWithCc(long messageId, boolean hasAttachments) { - MatrixCursor cursor = new MatrixCursor(UIProvider.MESSAGE_PROJECTION); + private static Message getRefMessageWithCc(long messageId, boolean hasAttachments) { + MatrixCursor cursor = new MatrixCursorWithCachedColumns(UIProvider.MESSAGE_PROJECTION); final String messageUri = "content://xxx/message/" + messageId; Object[] messageValues = new Object[UIProvider.MESSAGE_PROJECTION.length]; messageValues[UIProvider.MESSAGE_ID_COLUMN] = Long.valueOf(messageId); |