ContactsProvider2.java 中的queryLocal函数,修改方法如下:
case CALLABLES_FILTER:
......
if (searchPhoneNumber) {
......
sb.append(Data._ID +
" IN (SELECT DISTINCT " + PhoneLookupColumns.DATA_ID
+ " FROM " + Tables.PHONE_LOOKUP
+ " WHERE " + PhoneLookupColumns.NORMALIZED_NUMBER + " LIKE ‘");
//add here
sb.append("%");
sb.append(number);
sb.append("%‘)");
hasCondition = true;
}
时间: 2024-11-15 00:44:14