更改檔案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;
(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;
版權宣告:本文博主原創文章,部落格,未經同意不得轉載。