更改文件ContactLocaleUtils.java两
(Path:packages/contactsprovider/src/com/android/providers/contacts)
1. 性能public ContactLocaleUtilsBase(Locale locale)结尾处
...
mAlphabeticIndexBucketCount = mAlphabeticIndex.getBucketCount();
//add
//mNumberBucketIndex = mAlphabeticIndexBucketCount - 1;
mNumberBucketIndex = 0;
2. 函数public int getBucketIndex(String name)结尾处
...
final int bucket = mAlphabeticIndex.getBucketIndex(name);
if (bucket < 0) {
return -1;
}
//add
if(bucket == 0){ //将特殊符号联系人归类到#组,若不须要请去掉
return mNumberBucketIndex;
}
//if (bucket >= mNumberBucketIndex) {
// return bucket + 1;
//}
//return bucket;
return bucket+1;
版权声明:本文博主原创文章,博客,未经同意不得转载。