https://groups.google.com/forum/#!topic/libphonenumber-discuss/75TOpTFVi08
* Initial code changes to support the new possibleLengths infrastructure
when building metadata. Includes setting these in the main metadata
file and changing the code to populate them in the PhoneMetadata proto
at build time. Updating tests for Java.
* Updating comment about the possible_lengths_local_only field.
* Adding the generated jars that build files containing the new possible
lengths fields.
* Rebuilding short-number metadata with the new proto field. Not doing
this at release time so we can see what changes in the metadata are due
to metadata fixes, rather than this possibleLengths field.
* Regeneration of phone number metadata with the new possible length
information filled in.
Includes some possible length changes for KR and BY, and a validation
fix for NA where a digit was missing.
* Updating the test proto metadata files with the new possible length
information.
* Added notes about the code changes.
* Regenerating C++ metadata with new possibleLength info and updating unit
test to check this works.
Making function IsNumberGeographical public. This function operates on
the type of number and the country it belongs to only, so may have some
false positives.
Using this in the geocoder so that geocoding now limited to numbers that
we consider geographical, based on their type and country, rather than
just based on their type. The C++ geocoder did not previously check the
number type/country at all.
Indonesian and Chinese mobile numbers have now been added to the list of
possibly-geographical numbers.
* New useful getExampleNumber methods (for testing) - one for invalid
numbers and one for getting a number of a particular type without
specifying a country.
alternate formats to be included to be found. This means that if the
user doesn't have this option set to true, the tests won't be run (they
would otherwise fail).
With strict error checking, 32 bit compiles on some platforms fail with
the error:
"error: this decimal constant is unsigned only in ISO C90"
This patch fixes the error by adding the "u" unsigned qualifier to the
integers.
Author: daniel@pocock.proR=jia.shao.peng@gmail.com
BUG=
Review URL: https://codereview.appspot.com/123610044
This CL ensures that:
- All declarations in headers are made in the i18n::phonenumbers namespace.
- All USE flags/macros are prefixed with I18N_PHONENUMBERS_ to avoid name
clashes.
- All the code in base/ is actually used (by deleting unused code).
- Outdated occurrences of USE_GOOGLE_BASE don't exist anymore.
- Logging in PhoneNumberUtil is disabled by default (in production). However it
can be enabled by calling PhoneNumberUtil::SetLogger() as it is now done
during testing.
BUG=http://crbug.com/236272R=jia.shao.peng@gmail.com
Review URL: https://codereview.appspot.com/9162043
This is mainly a metadata update.
Modified files:
cpp/src/phonenumbers/lite_metadata.cc
cpp/src/phonenumbers/metadata.cc
cpp/src/phonenumbers/phonenumberutil.cc
cpp/test/phonenumbers/phonenumbermatcher_test.cc
Review URL: https://codereview.appspot.com/6028044