From de9f04ea0df2270133acef748b821a106acea799 Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 25 Jan 2011 02:29:31 +0000 Subject: [PATCH] Avoid IllegalArgumentException - Only fetch display name in getOwnerName() --- src/com/fsck/k9/helper/ContactsSdk3_4.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/fsck/k9/helper/ContactsSdk3_4.java b/src/com/fsck/k9/helper/ContactsSdk3_4.java index af4176907..a6e03e7c3 100644 --- a/src/com/fsck/k9/helper/ContactsSdk3_4.java +++ b/src/com/fsck/k9/helper/ContactsSdk3_4.java @@ -91,7 +91,7 @@ public class ContactsSdk3_4 extends com.fsck.k9.helper.Contacts String name = null; final Cursor c = mContentResolver.query( Uri.withAppendedPath(Contacts.People.CONTENT_URI, "owner"), - PROJECTION, + new String[] {Contacts.ContactMethods.DISPLAY_NAME}, null, null, null); @@ -101,7 +101,7 @@ public class ContactsSdk3_4 extends com.fsck.k9.helper.Contacts if (c.getCount() > 0) { c.moveToFirst(); - name = getName(c); + name = c.getString(0); // owner's display name } c.close(); }