am b5343c4c: Merge branch \'readonly-p4-donut\' into donut

Merge commit 'b5343c4cc535a885d9913811a4d6616dd0d24e13'

* commit 'b5343c4cc535a885d9913811a4d6616dd0d24e13':
  AI 149203: Manual merge CL 149118: "Make URL which is in the head of body text be
This commit is contained in:
Andy Stadler 2009-05-22 12:23:06 -07:00 committed by The Android Open Source Project
commit 0f4ea703cd

View File

@ -950,7 +950,12 @@ public class MessageView extends Activity
Matcher m = Regex.WEB_URL_PATTERN.matcher(text);
while (m.find()) {
int start = m.start();
if (start != 0 && text.charAt(start - 1) != '@') {
/*
* WEB_URL_PATTERN may match domain part of email address. To detect
* this false match, the character just before the matched string
* should not be '@'.
*/
if (start == 0 || text.charAt(start - 1) != '@') {
m.appendReplacement(sb, "<a href=\"$0\">$0</a>");
}
else {