diff options
author | Eric Fischer <enf@google.com> | 2009-09-14 10:24:24 -0700 |
---|---|---|
committer | Eric Fischer <enf@google.com> | 2009-09-14 11:48:50 -0700 |
commit | 7a4be89f5a7188d3e10ff0e1f71722ab161a5456 (patch) | |
tree | 7bcc391f2bc6eb060de061d96875750648656ccd /core/java | |
parent | 714ec1360cde8b1cbf6e6b8572256e4100f11560 (diff) | |
download | frameworks_base-7a4be89f5a7188d3e10ff0e1f71722ab161a5456.zip frameworks_base-7a4be89f5a7188d3e10ff0e1f71722ab161a5456.tar.gz frameworks_base-7a4be89f5a7188d3e10ff0e1f71722ab161a5456.tar.bz2 |
Add "rtsp" to the list of URL schemes that get linkified.
Bug 1845298
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/text/util/Linkify.java | 2 | ||||
-rw-r--r-- | core/java/android/text/util/Regex.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/text/util/Linkify.java b/core/java/android/text/util/Linkify.java index d61e888..ce25c47 100644 --- a/core/java/android/text/util/Linkify.java +++ b/core/java/android/text/util/Linkify.java @@ -208,7 +208,7 @@ public class Linkify { if ((mask & WEB_URLS) != 0) { gatherLinks(links, text, Regex.WEB_URL_PATTERN, - new String[] { "http://", "https://" }, + new String[] { "http://", "https://", "rtsp://" }, sUrlMatchFilter, null); } diff --git a/core/java/android/text/util/Regex.java b/core/java/android/text/util/Regex.java index a349b82..a6844a4 100644 --- a/core/java/android/text/util/Regex.java +++ b/core/java/android/text/util/Regex.java @@ -65,7 +65,7 @@ public class Regex { */ public static final Pattern WEB_URL_PATTERN = Pattern.compile( - "((?:(http|https|Http|Https):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)" + "((?:(http|https|Http|Https|rtsp|Rtsp):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)" + "\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_" + "\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?" + "((?:(?:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}\\.)+" // named host |