long contactId = cursor.getLong(QUERY_CONTACT_ID);
String lookupKey = cursor.getString(QUERY_LOOKUP_KEY);
QuickContactBadge photo = view.getQuickContact();
//photo.assignContactFromPhone(cursor.getString(QUERY_NUMBER), true);
//此方法用电话查询数据库,绑定联系人信息。在名字不同,电话号码相同时,会出现BUG 。
//true 表示只在点击头像时才查询数据库。
photo.assignContactUri(Contacts.getLookupUri(contactId,lookupKey));
//此方法用contactId和lookupkey查询联系人信息,可以解决上述BUG.