private List<RecipientEntry> generateFakeRecipientsEntries() { final List<RecipientEntry> allEntries=new ArrayList<RecipientEntry>(); for(int i=0;i<100;++i) { final RecipientEntry entry=RecipientEntry.constructTopLevelEntry("abc"+i,DisplayNameSources.NICKNAME,"address"+i,0,null,i,i,(String)null,true,false); allEntries.add(entry); } return allEntries; }
/** * @return the display name for the entry. If the display name source is larger than * {@link DisplayNameSources#PHONE} we use the contact's display name, but if not, * i.e. the display name came from an email address or a phone number, we don't use it * to avoid confusion and just use the destination instead. */ private static String pickDisplayName(int displayNameSource, String displayName, String destination) { return (displayNameSource > DisplayNameSources.PHONE) ? displayName : destination; }
/** * @return the display name for the entry. If the display name source is larger than {@link DisplayNameSources#PHONE} we use the contact's display name, but if not, i.e. the display name * came from an email address or a phone number, we don't use it to avoid confusion and just use the * destination instead. */ private static String pickDisplayName(final int displayNameSource,final String displayName,final String destination) { return displayNameSource>DisplayNameSources.PHONE ? displayName : destination; }