Exemplo n.º 1
0
 public void initAddPageData() {
   Log.i("Init add page data...");
   Context context = getApplicationContext();
   Conversation.init(context);
   RecipientIdCache.init(context);
   Contact.init(context);
   CallLog.init(context);
   Log.i("Init add page data completed.");
   mInitedAddPage = true;
 }
Exemplo n.º 2
0
 /**
  * Returns a ContactList for the corresponding recipient ids passed in. This method will create
  * the contact if it doesn't exist, and would inject the recipient id into the contact.
  */
 public static ContactList getByIds(String spaceSepIds, boolean canBlock) {
   ContactList list = new ContactList();
   for (RecipientIdCache.Entry entry : RecipientIdCache.getAddresses(spaceSepIds)) {
     if (entry != null && !TextUtils.isEmpty(entry.number)) {
       Contact contact = Contact.get(entry.number, canBlock);
       contact.setRecipientId(entry.id);
       list.add(contact);
     }
   }
   return list;
 }