// 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() + "]"); } } } } }
public boolean startLoadContact() { boolean ret = mContactsHelper.startLoadContacts(); log.i("startLoadContact ret = " + ret); return ret; }
public void parseT9InputSearchContacts(String search) { log.i("parseT9InputSearchContacts search = " + search); mContactsHelper.parseT9InputSearchContacts(search); }
private void init() { mContactsHelper = ContactsHelper.getInstance(); mContactsHelper.setOnContactsLoad(this); }