From 1ea78d92e6c148f28326f475373fb40e65350909 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 10 Jun 2011 17:47:16 +0900 Subject: [PATCH] Stop using raw e-mail addresses as names in contacts dict. Bug: 4590281 Change-Id: I37016dd066efa1463077c67e05218148cbb67df4 --- .../src/com/android/inputmethod/latin/ContactsDictionary.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/ContactsDictionary.java b/java/src/com/android/inputmethod/latin/ContactsDictionary.java index b057cf4e3..e789e63cc 100644 --- a/java/src/com/android/inputmethod/latin/ContactsDictionary.java +++ b/java/src/com/android/inputmethod/latin/ContactsDictionary.java @@ -114,7 +114,7 @@ public class ContactsDictionary extends ExpandableDictionary { while (!cursor.isAfterLast()) { String name = cursor.getString(INDEX_NAME); - if (name != null) { + if (name != null && -1 == name.indexOf('@')) { int len = name.length(); String prevWord = null; @@ -143,8 +143,6 @@ public class ContactsDictionary extends ExpandableDictionary { if (wordLen < maxWordLength && wordLen > 1) { super.addWord(word, FREQUENCY_FOR_CONTACTS); if (!TextUtils.isEmpty(prevWord)) { - // TODO Do not add email address - // Not so critical super.setBigram(prevWord, word, FREQUENCY_FOR_CONTACTS_BIGRAM); }