[Autofill] Replace usage of libphonenumber.IsValidNumber with IsPossibleNumber.
Autofill calls libphonenumber.IsValidNumber for number validation. This method validates carrier code(among other things) and it's a bit too strict for autofill's usage. For example, it would reject 6501231234 as a valida US number because the first number after area code cannot be 1. This CL switches to use IsPossibleNumber instead, so autofill will take above number and parse it as if it is a valid number. Benefits: 1. metadata of libphonenumber might not be the latest due to chrome's release cycle, therefore IsValidaNumber might reject valid numbers, while IsPossibleNumber will not. 2. Might allow libphonenumber to use a lite metadata to save a little of binary size. Bug: 792471 Change-Id: I25d3b21b81010b92a69b16f91f7d072e86ac7839 Reviewed-on: https://chromium-review.googlesource.com/827163Reviewed-by:Roger McFarlane <rogerm@chromium.org> Reviewed-by:
Sebastien Seguin-Gagnon <sebsg@chromium.org> Commit-Queue: Hui Wu <wuandy@chromium.org> Cr-Commit-Position: refs/heads/master@{#524712}
Showing
This diff is collapsed.
Please register or sign in to comment