Skip to content

Instantly share code, notes, and snippets.

@codescv
Created September 16, 2013 01:35
Show Gist options
  • Save codescv/6575824 to your computer and use it in GitHub Desktop.
Save codescv/6575824 to your computer and use it in GitHub Desktop.
Allow searching pinyin in the T9 dialer in non-Chinese locales on cm10.1
┌──[chi@mint]──[~/android/system/packages/apps/Contacts]── (8e9a5fb...) * ────────
$ git diff
diff --git a/src/com/android/contacts/dialpad/util/NameToNumberFactory.java b/src/com/android/contacts/dial
index c0adef6..3ca285b 100644
--- a/src/com/android/contacts/dialpad/util/NameToNumberFactory.java
+++ b/src/com/android/contacts/dialpad/util/NameToNumberFactory.java
@@ -34,13 +34,15 @@ public class NameToNumberFactory {
// Check locale and returns matched class inherited from NameToNumber class.
NameToNumber instance;
- if (lc.getLanguage().equalsIgnoreCase("ko")) {
+ instance = new NameToNumberChinese(t9Chars, t9Digits);
+
+ /*if (lc.getLanguage().equalsIgnoreCase("ko")) {
instance = new NameToNumberKorean(t9Chars, t9Digits);
} else if (lc.equals(Locale.CHINA)) {
instance = new NameToNumberChinese(t9Chars, t9Digits);
} else {
instance = new NameToNumber(t9Chars, t9Digits);
- }
+ }*/
return instance;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment