Ejemplo n.º 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()
                   + "]");
         }
       }
     }
   }
 }
Ejemplo n.º 2
0
 private void init() {
   mContactsHelper = ContactsHelper.getInstance();
   mContactsHelper.setOnContactsLoad(this);
 }