1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-04 08:35:08 -05:00

Avoid IllegalArgumentException - Only fetch display name in getOwnerName()

This commit is contained in:
cketti 2011-01-25 02:29:31 +00:00
parent 57be868668
commit de9f04ea0d

View File

@ -91,7 +91,7 @@ public class ContactsSdk3_4 extends com.fsck.k9.helper.Contacts
String name = null; String name = null;
final Cursor c = mContentResolver.query( final Cursor c = mContentResolver.query(
Uri.withAppendedPath(Contacts.People.CONTENT_URI, "owner"), Uri.withAppendedPath(Contacts.People.CONTENT_URI, "owner"),
PROJECTION, new String[] {Contacts.ContactMethods.DISPLAY_NAME},
null, null,
null, null,
null); null);
@ -101,7 +101,7 @@ public class ContactsSdk3_4 extends com.fsck.k9.helper.Contacts
if (c.getCount() > 0) if (c.getCount() > 0)
{ {
c.moveToFirst(); c.moveToFirst();
name = getName(c); name = c.getString(0); // owner's display name
} }
c.close(); c.close();
} }