From 73ec85b8ad3102ce1c7e6013be73afe83475e589 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Mon, 15 Apr 2013 17:33:48 +0900 Subject: Don't insert automatic spaces when text looks like a URL This is about as ad-hoc as it gets, but then again, what we want is probably as ad-hoc as it gets. All URL boxes I know of double as search bars, and not adding automatic spaces there sucks (e.g. in Chrome URL bar). And in other boxes actually you don't want to add a space if it looks like a URL. QSB isn't even a search box, and it behaves like this. So I think this is actually the right answer to the problem. Bug: 7062925 Change-Id: Ib09472b34644fd5bf2dc84bb97cedeeba28bcd02 --- java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java') diff --git a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java index 22d189987..75c2cf2c8 100644 --- a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java @@ -252,7 +252,7 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary { } private static boolean isValidName(final String name) { - if (name != null && -1 == name.indexOf('@')) { + if (name != null && -1 == name.indexOf(Constants.CODE_COMMERCIAL_AT)) { return true; } return false; -- cgit v1.2.3-83-g751a