From 2da2e4632dfd84f956d778f3fe6a83c2719296c7 Mon Sep 17 00:00:00 2001 From: Dan Egnor Date: Wed, 18 Nov 2009 12:11:55 -0800 Subject: [PATCH] Change android.text.util.Regex to com.android.common.Patterns --- src/com/android/email/activity/MessageView.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/android/email/activity/MessageView.java b/src/com/android/email/activity/MessageView.java index 27152428a..8300da315 100644 --- a/src/com/android/email/activity/MessageView.java +++ b/src/com/android/email/activity/MessageView.java @@ -16,6 +16,7 @@ package com.android.email.activity; +import com.android.common.Patterns; import com.android.email.Controller; import com.android.email.Email; import com.android.email.R; @@ -58,7 +59,6 @@ import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.QuickContact; import android.provider.ContactsContract.StatusUpdates; import android.text.TextUtils; -import android.text.util.Regex; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; @@ -1309,7 +1309,7 @@ public class MessageView extends Activity implements OnClickListener { // Escape any inadvertent HTML in the text message text = EmailHtmlUtil.escapeCharacterToDisplay(text); // Find any embedded URL's and linkify - Matcher m = Regex.WEB_URL_PATTERN.matcher(text); + Matcher m = Patterns.WEB_URL.matcher(text); while (m.find()) { int start = m.start(); /* @@ -1326,7 +1326,7 @@ public class MessageView extends Activity implements OnClickListener { // because WebView could follow only lower case protocol link. link = proto.group().toLowerCase() + url.substring(proto.end()); } else { - // Regex.WEB_URL_PATTERN matches URL without protocol part, + // Patterns.WEB_URL matches URL without protocol part, // so added default protocol to link. link = "http://" + url; } @@ -1470,7 +1470,7 @@ public class MessageView extends Activity implements OnClickListener { // */ // StringBuffer sb = new StringBuffer(""); // if (text != null) { -// Matcher m = Regex.WEB_URL_PATTERN.matcher(text); +// Matcher m = Patterns.WEB_URL.matcher(text); // while (m.find()) { // int start = m.start(); // /* @@ -1488,7 +1488,7 @@ public class MessageView extends Activity implements OnClickListener { // link = proto.group().toLowerCase() // + url.substring(proto.end()); // } else { -// // Regex.WEB_URL_PATTERN matches URL without protocol part, +// // Patterns.WEB_URL matches URL without protocol part, // // so added default protocol to link. // link = "http://" + url; // }