diff options
author | taiki tsutsumi <taiki.x.tsutsumi@sonymobile.com> | 2016-12-07 17:19:15 +0900 |
---|---|---|
committer | Kenji Yokoyama <kenji.yokoyama@sonymobile.com> | 2017-04-28 13:54:48 +0900 |
commit | 6000b7dc911fe05857882c2d5de38c4ef9a7ff4f (patch) | |
tree | f42d2eadda0a460c817087fe174763d0254b0e00 | |
parent | f378cd950b4ba216377d294e4bb2c9d841dd2ad6 (diff) | |
download | ContactsProvider-6000b7dc911fe05857882c2d5de38c4ef9a7ff4f.tar.gz |
Fixed the issue that unknown contact sort
Change the header of unknown contact to #.
When using JapaneseContactUtil and ChineseTWContactUtils,
change the sort index of Number Bucket.
affected area:
When including Japanese and Chinese.
This utility class provides specialized handling for locale specific.
information: labels, name lookup keys.
Change-Id: Ie60d647d2b9823194c5f7319f7e57a2f370b4e3a
-rw-r--r-- | src/com/android/providers/contacts/ContactLocaleUtils.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/providers/contacts/ContactLocaleUtils.java b/src/com/android/providers/contacts/ContactLocaleUtils.java index 3480960a..2b7f1ff4 100644 --- a/src/com/android/providers/contacts/ContactLocaleUtils.java +++ b/src/com/android/providers/contacts/ContactLocaleUtils.java @@ -425,6 +425,19 @@ public class ContactLocaleUtils { keys.add(romajiName); return keys.iterator(); } + + /** + * Returns the number for "#" bucket index. + * Adds an additional 'misc' bucket for Kanji characters to the base class set. + */ + @Override + public int getNumberBucketIndex() { + final int numberBucketIndex = super.getNumberBucketIndex(); + if (numberBucketIndex > mMiscBucketIndex) { + return numberBucketIndex + 1; + } + return numberBucketIndex; + } } /** |