am 238efad0: Merge "Change Linkify leniency to VALID" into lmp-mr1-dev

* commit '238efad04bfd144942b363c8589004ba831f3c63':
  Change Linkify leniency to VALID
This commit is contained in:
Raph Levien
2014-12-05 02:19:38 +00:00
committed by Android Git Automerger

View File

@@ -402,7 +402,7 @@ public class Linkify {
}
boolean hasPrefix = false;
for (int i = 0; i < prefixes.length; i++) {
if (url.regionMatches(true, 0, prefixes[i], 0,
prefixes[i].length())) {
@@ -450,7 +450,7 @@ public class Linkify {
private static final void gatherTelLinks(ArrayList<LinkSpec> links, Spannable s) {
PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
Iterable<PhoneNumberMatch> matches = phoneUtil.findNumbers(s.toString(),
Locale.getDefault().getCountry(), Leniency.POSSIBLE, Long.MAX_VALUE);
Locale.getDefault().getCountry(), Leniency.VALID, Long.MAX_VALUE);
for (PhoneNumberMatch match : matches) {
LinkSpec spec = new LinkSpec();
spec.url = "tel:" + PhoneNumberUtils.normalizeNumber(match.rawString());