OSDN Git Service

Only match addresses without zip codes if at the end.
authorTorne (Richard Coles) <torne@google.com>
Fri, 6 Apr 2018 19:17:55 +0000 (15:17 -0400)
committerTorne (Richard Coles) <torne@google.com>
Fri, 6 Apr 2018 19:26:36 +0000 (15:26 -0400)
commitcfaf8a1e5bea143b9604dd87078d22cd5d9b1b6c
tree340d1aba1de5a849326c733146f5f9430960a352
parente7154b6d5a9300c8bfbfc46bf8e65ff1ab446c62
Only match addresses without zip codes if at the end.

The old native implementation of findAddress only accepted addresses
without zip codes if they appeared at the end of the string. This was
probably a bug as the documentation implies this should work in all
cases, but fixing this bug has caused a lot of false positives while not
fixing very many false negatives and this functionality is being
deprecated anyway, so change it back.

Fixes: 75409267
Test: tested upstream in chromium; direct copy of that code
Change-Id: I3f3c300035cf02a23284737431bc6f94f542cbe7
core/java/android/webkit/FindAddress.java