コード例 #1
0
 // just for debug
 public void showContactsInfo() {
   int contactsCount = ContactsHelper.getInstance().getBaseContacts().size();
   for (int i = 0; i < contactsCount; i++) {
     Contacts currentCoutacts = null;
     for (currentCoutacts = ContactsHelper.getInstance().getBaseContacts().get(i);
         null != currentCoutacts;
         currentCoutacts = currentCoutacts.getNextContacts()) {
       Log.i(TAG, "======================================================================");
       String name = currentCoutacts.getName();
       List<PinyinUnit> pinyinUnit = currentCoutacts.getNamePinyinUnits();
       Log.i(
           TAG,
           "++++++++++++++++++++++++++++++:name=["
               + name
               + "] phoneNumber"
               + currentCoutacts.getPhoneNumber()
               + currentCoutacts.isHideMultipleContacts()
               + "firstCharacter=["
               + PinyinUtil.getFirstCharacter(pinyinUnit)
               + "]"
               + "firstLetter=["
               + PinyinUtil.getFirstLetter(pinyinUnit)
               + "]"
               + "+++++++++++++++++++++++++++++");
       int pinyinUnitCount = pinyinUnit.size();
       for (int j = 0; j < pinyinUnitCount; j++) {
         PinyinUnit pyUnit = pinyinUnit.get(j);
         Log.i(
             TAG,
             "j="
                 + j
                 + ",isPinyin["
                 + pyUnit.isPinyin()
                 + "],startPosition=["
                 + pyUnit.getStartPosition()
                 + "]");
         List<PinyinBaseUnit> stringIndex = pyUnit.getPinyinBaseUnitIndex();
         int stringIndexLength = stringIndex.size();
         for (int k = 0; k < stringIndexLength; k++) {
           Log.i(
               TAG,
               "k="
                   + k
                   + "["
                   + stringIndex.get(k).getOriginalString()
                   + "]"
                   + "["
                   + stringIndex.get(k).getPinyin()
                   + "]+["
                   + stringIndex.get(k).getNumber()
                   + "]");
         }
       }
     }
   }
 }
コード例 #2
0
  public boolean startLoadContact() {

    boolean ret = mContactsHelper.startLoadContacts();
    log.i("startLoadContact ret = " + ret);
    return ret;
  }
コード例 #3
0
 public void parseT9InputSearchContacts(String search) {
   log.i("parseT9InputSearchContacts search = " + search);
   mContactsHelper.parseT9InputSearchContacts(search);
 }
コード例 #4
0
 private void init() {
   mContactsHelper = ContactsHelper.getInstance();
   mContactsHelper.setOnContactsLoad(this);
 }