History log of /frameworks/base/core/java/android/util/Patterns.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
06e9629f00008ed49da9a49b767b590383df3241 11-Aug-2017 Siyamed Sinir <siyamed@google.com> Fix email auto link when there are two chars in local part

Email auto linking used to accept either a single char or more than 2
chars in the local part. Updated the regular expression to accept 1 or
more chars.

Test: added test to cts.LinkifyTest
Test: bit -t CtsTextTestCases:android.text.util.cts.LinkifyTest
Test: bit -t FrameworksCoreTests:android.util.PatternsTest
Test: bit -t FrameworksCoreTests:android.text.util.LinkifyTest
Test: bit -t CtsWidgetTestCases:android.widget.cts.TextViewTest

Bug: 64467661
Change-Id: I4e28a344ff1bc50da353b9490eaaec99a751bffb
(cherry picked from commit e17c5b478e2446154288d658ef4099a722809dc7)
/frameworks/base/core/java/android/util/Patterns.java
19f1844e7e66061cdc01cb446251df6558fa9556 07-Mar-2017 Andreas Gampe <agampe@google.com> Merge "Framework: Ensure image heap string literals for Patterns" am: d0f092af84 am: 838851364b
am: 5fe3eb7696

Change-Id: Ia0bf25c740eedee436436e573241a59685db2fbd
7f8466fab49f684ec3f430d15ae765d3886052c5 03-Mar-2017 Andreas Gampe <agampe@google.com> Framework: Ensure image heap string literals for Patterns

Do not use Pattern.toString to construct complex patterns. Instead,
make the string literals explicit so they can be compile-time
allocated, thus ending up as clean memory in the image heap.

Bug: 34956610
Test: m
Test: Device boots
Change-Id: I20d45c31243af00168553c218f75fb0795b55149
/frameworks/base/core/java/android/util/Patterns.java
5932e8b8f0681be45cdb9b2ed707e1eb9973180d 05-Apr-2016 Siyamed Sinir <siyamed@google.com> Update autoLink URL regex to match empty path, $ and _

Update URL regular expression to match
- path and query that contains dollar sign
- domain name that contains underscore
- empty path with query parameters. i.e. a.com?q=v

Bug: 27436084
Bug: 27501264
Change-Id: I3884624e145ccc1175915327dc2f280ef4e55ce1
/frameworks/base/core/java/android/util/Patterns.java
7903aba3ca30cda4abceb8f516f11064fe0da939 12-Apr-2016 Siyamed Sinir <siyamed@google.com> Fix Patterns.UCS_CHAR character class

Wrap Patterns.UCS_CHAR character class with brackets. Previously CL
Ie6df818dc4d33dfee6ee54432a2231cca51ec423 broke autoLink email and URL
patterns while excluding the empty spaces.

Bug: 28020781
Change-Id: Ieb7d09cb5e544c1e7cbc1a4d665b979c65e7e773
/frameworks/base/core/java/android/util/Patterns.java
911c2694e2b08c7a3dbb77150afcd09ff01e5ccf 06-Apr-2016 Siyamed Sinir <siyamed@google.com> Exclude unicode space characters from autoLink URL patterns

Excludes the following space characters from autoLink URL patterns:
\u00A0: no-break space
\u2000: en quad
\u2001: em quad
\u2002: en space
\u2003: em space
\u2004: three-per-em space
\u2005: four-per-em space
\u2006: six-per-em space
\u2007: figure space
\u2008: punctuation space
\u2009: thin space
\u200A: hair space
\u2028: line separator
\u2029: paragraph separator
\u202F: narrow no-break space
\u3000: ideographic space

Bug: 28020781
Change-Id: Ie6df818dc4d33dfee6ee54432a2231cca51ec423
/frameworks/base/core/java/android/util/Patterns.java
0716d5f499949cb131a9a06ac022b26ee8dbb413 26-Feb-2016 Siyamed Sinir <siyamed@google.com> Email address autolink regex updates.

This CL updates the email address pattern with:
* Local-part should be max 64 characters, and domain should be max 255
characters (it was the opposite before).
* Labels in the domain name should be at most 63 characters.
* Support non-ascii unicode characters.
* Add tests for email address pattern.

Bug:9585450
Change-Id: I983f269904ef014ef625417dd08b6509084e6879
/frameworks/base/core/java/android/util/Patterns.java
840385c9f6a2805d6f54f08f3592d80facdf5b3d 19-Nov-2015 Siyamed Sinir <siyamed@google.com> New regular expression to autolink URLs

Introduced a new regular expression to autolink URLs. Previous regular
expression used the protocol as an optional rule. The new expression
applies separate rules for strings that do not start with a known
protocol and strings that do start with a known protocol.

- In order to reuse previous regular expression definitions for
different parts of a URL, created constants for different parts of
WEB_URL expression.
- Separated the test cases for WEB_URL in order to remove the suppress
command and make them running again.
- Fixed failing tests for punycode urls, which were causing existing
tests to fail.
- Introduced new a regular expression for URL matching.
- Changed the protocol rule to be case insensitive.
- Updated IANA TLDs.
- Added tests for the new regular expression.
- Added tests for Linkify.
- Bug 9622849 is partially fixed.

Bug: 25727599
Bug: 9622849
Bug: 24500693
Bug: 23189367
Bug: 24543148

Change-Id: Ifd62455d342ca7adb22996246ff652e1d5944bec
/frameworks/base/core/java/android/util/Patterns.java
a3bb66a75ef746fc77e9c9dd466afdef7a56996c 23-Apr-2014 Selim Gurun <sgurun@google.com> Tune down the linkify false positive rate

Bug: 14066316

Tune down the false positive rate by restricting gTLD pattern a little bit.

Change-Id: I7bd39633d3267930593bd7231f764c110293301f
/frameworks/base/core/java/android/util/Patterns.java
b080c3c54a79493863aee3f4ba5d96307ac500ec 13-Feb-2014 Selim Gurun <sgurun@google.com> Support for new gTLDs

Bug: 13006774

Add support for new generic Top-Level Domains (gTLDs) from ICANN
and deprecate the public APIs that depend on them. Due to the
fast profileration of gTLDs, it has become hard to keep this API
up-to-date. Further it already fails to recognize internal domains.
We thus replace them with simple "any letter sequence" regexps.

This CL is almost same as Ib6cb5360bbb4a02b14bb34acb30d1cc8ddec771b.
The difference is that the values of the public gTLD strings are only
deprecated and not modified.

Change-Id: I37c130ace9068b80eeaec3282a77450517ed7794
/frameworks/base/core/java/android/util/Patterns.java
a739994d60880a786ec9e281e3235e54824daa90 26-Mar-2014 Selim Gurun <sgurun@google.com> Revert "Support for new gTLDs"

This reverts commit d3ff8bdf92c23d596f3e4701455223f9e3ac8873.

Change-Id: I2006c4fcca54a4bc3b680ea0b0600b359cac6ca3
/frameworks/base/core/java/android/util/Patterns.java
d3ff8bdf92c23d596f3e4701455223f9e3ac8873 13-Feb-2014 Selim Gurun <sgurun@google.com> Support for new gTLDs

Bug: 13006774

Add support for new generic Top-Level Domains (gTLDs) from ICANN
and deprecate the public APIs that depend on them. Due to the
fast profileration of gTLDs, it has become hard to keep this API
up-to-date. Further it already fails to recognize internal domains.
We thus replace them with simple "any letter sequence" regexps.

Change-Id: Ib6cb5360bbb4a02b14bb34acb30d1cc8ddec771b
/frameworks/base/core/java/android/util/Patterns.java
c3955e7e5a79f450c34e3b8052f1bb692b639580 11-Mar-2014 Narayan Kamath <narayan@google.com> Remove stray logging statement.

bug: https://code.google.com/p/android/issues/detail?id=66974
Change-Id: Ie34c102de143cf6aeb16c78778dda3ef5e928380
/frameworks/base/core/java/android/util/Patterns.java
a37fc575a4ac40f3ff2e9a9f2108b577a649db73 19-Sep-2012 Bin Zhu <bin.zhu@sonyericsson.com> Allow three digit phone numbers

The comment for the PHONE pattern says:

"<digit><digit|sdd>+<digit>"

But the actual pattern requires that the string contains
more than that. A phone number should be allowed to be
three digits.

Change-Id: I86d2f3d634cd0c1654dad9814906f151055dc23a
/frameworks/base/core/java/android/util/Patterns.java
52fc810f73e0d8e005281e80a981e1ceed855850 19-Jul-2011 Shimeng (Simon) Wang <swang@google.com> Add in i18n TLDs and new TLDs to the URL RegEx matcher.

also update APIs.

issue: 4384739
Change-Id: I946323d80f85fe43338fdc19c5858356faefa6cc
/frameworks/base/core/java/android/util/Patterns.java
db990751ef8e535ea5cb3d527e36936e119095e8 07-May-2010 Shimeng (Simon) Wang <swang@google.com> Updated URL pattern based on http://data.iana.org/TLD/tlds-alpha-by-domain.txt

Note: this change doesn't solve the Arabic country code top level domains, which
was turned on today. For that, more changes need to be done; probably we need a way
to convert the BiDi url to punycode first; then apply this URL pattern.

issue: 2663885
Change-Id: I0597fe620c4d44259bff88ecfcbcca1565928c6f
/frameworks/base/core/java/android/util/Patterns.java
cbeaf2d0aef5c8de9ce86b8f1dde17459f9227e3 07-May-2010 Shimeng (Simon) Wang <swang@google.com> Revert "Updated URL pattern based on http://data.iana.org/TLD/tlds-alpha-by-domain.txt"

This reverts commit 63b849ef8d6a47422b0f2779f1d9320f6a65d16b.
/frameworks/base/core/java/android/util/Patterns.java
9b1872e619bd06f33853716a4bae0214b4a7d176 07-May-2010 Shimeng (Simon) Wang <swang@google.com> Updated URL pattern based on http://data.iana.org/TLD/tlds-alpha-by-domain.txt

Note: this change doesn't solve the Arabic country code top level domains, which
was turned on today. For that, more changes need to be done; probably we need a way
to convert the BiDi url to punycode first; then apply this URL pattern.

issue: 2663885
Change-Id: Iac5d16bf9e091a072a59f8244ab6e87940badd4f
/frameworks/base/core/java/android/util/Patterns.java
40064d3098e17eb447e2b9ee4512b691f6b8c269 27-Apr-2010 Shimeng (Simon) Wang <swang@google.com> Add good international characters to the path part of Url pattern.

Change-Id: I05efb7e52a023fcb92db9db2b41dbab2ccca87c7
/frameworks/base/core/java/android/util/Patterns.java
2269d1572e5fcfb725ea55f5764d8c3280d69f6d 25-Feb-2010 Dianne Hackborn <hackbod@google.com> Re-arrange android-common so framework no longer links with it.

This is the framework part, moving classes around so the framework
no longer needs to link to android-common. Makes some APIs public,
others that didn't need to be public are private in the framework,
some small things are copied.
/frameworks/base/core/java/android/util/Patterns.java