summaryrefslogtreecommitdiff
path: root/libphonenumber/src/com/google/i18n/phonenumbers
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2017-02-16 11:11:10 +0000
committerPaul Duffin <paulduffin@google.com>2017-02-16 11:11:10 +0000
commit747cc2ad6a92424a7e64de5a4f325ab7180df6d2 (patch)
tree848b861a708a4f665f8c5fa91752afca38242905 /libphonenumber/src/com/google/i18n/phonenumbers
parent17f4fb05d4103f3ea554a0285b451b288afb939f (diff)
downloadlibphonenumber-747cc2ad6a92424a7e64de5a4f325ab7180df6d2.tar.gz
Upgrade to 8.3.0
Created using ./update-from-external.sh 7.7.5 m -j32 droid adb reboot bootloader fastboot flashall -w m -j32 cts cts-tradefed run cts -m CtsTelephonyTestCases -t android.telephony.cts.PhoneNumberUtilsTest m -j32 libphonenumber-test vogar --timeout 0 \ --classpath out/target/common/obj/JAVA_LIBRARIES/libphonenumber-test_intermediates/classes.jack \ com.google.i18n.phonenumbers Bug: 33563982 Test: As described above Change-Id: I74162ccd9874e035a5422da9abe561a6b20a67c9
Diffstat (limited to 'libphonenumber/src/com/google/i18n/phonenumbers')
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java5
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java84
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/ShortNumberInfo.java144
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_52bin0 -> 218 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_62bin113 -> 306 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_91bin1366 -> 632 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AMbin705 -> 707 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ARbin4529 -> 4525 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AUbin1257 -> 1307 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AXbin860 -> 869 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BDbin2308 -> 2311 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BRbin1524 -> 1526 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BYbin1420 -> 1422 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZbin484 -> 498 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CIbin495 -> 497 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CLbin1571 -> 1572 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CNbin4105 -> 4105 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CRbin607 -> 633 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DEbin2779 -> 2762 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJbin393 -> 385 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ESbin788 -> 789 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FRbin757 -> 758 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GBbin2906 -> 2983 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GGbin643 -> 651 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GHbin644 -> 638 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GWbin530 -> 504 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GYbin480 -> 480 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HNbin601 -> 602 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IDbin1785 -> 1844 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ILbin1167 -> 1160 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IMbin546 -> 572 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_INbin5300 -> 5631 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JEbin717 -> 733 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KIbin387 -> 435 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KMbin410 -> 391 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KRbin2721 -> 2732 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZbin895 -> 889 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LIbin747 -> 771 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MAbin945 -> 918 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MCbin624 -> 637 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MMbin1641 -> 1719 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQbin463 -> 463 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MUbin667 -> 669 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZbin488 -> 486 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NAbin951 -> 954 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NGbin1484 -> 1482 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PGbin556 -> 557 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_REbin479 -> 472 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RObin710 -> 738 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SCbin461 -> 423 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SJbin525 -> 526 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SKbin972 -> 989 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SObin639 -> 816 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TGbin403 -> 410 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJbin762 -> 744 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TTbin626 -> 626 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZbin601 -> 639 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UAbin1212 -> 1213 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_USbin1709 -> 1711 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VNbin1275 -> 1276 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZAbin769 -> 766 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BHbin239 -> 364 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BRbin643 -> 707 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HRbin305 -> 340 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KIbin250 -> 275 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MVbin218 -> 270 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MYbin206 -> 470 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SKbin278 -> 294 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TGbin227 -> 238 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZAbin272 -> 342 bytes
70 files changed, 86 insertions, 147 deletions
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java b/libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java
index c07a1739..dbf0f354 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java
@@ -26,9 +26,9 @@ import java.util.Set;
public class AlternateFormatsCountryCodeSet {
// A set of all country codes for which data is available.
static Set<Integer> getCountryCodeSet() {
- // The capacity is set to 57 as there are 43 different entries,
+ // The capacity is set to 58 as there are 44 different entries,
// and this offers a load factor of roughly 0.75.
- Set<Integer> countryCodeSet = new HashSet<Integer>(57);
+ Set<Integer> countryCodeSet = new HashSet<Integer>(58);
countryCodeSet.add(7);
countryCodeSet.add(27);
@@ -39,6 +39,7 @@ public class AlternateFormatsCountryCodeSet {
countryCodeSet.add(43);
countryCodeSet.add(44);
countryCodeSet.add(49);
+ countryCodeSet.add(52);
countryCodeSet.add(54);
countryCodeSet.add(55);
countryCodeSet.add(58);
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java b/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
index 705d657b..90a969e2 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
@@ -313,9 +313,9 @@ public class PhoneNumberUtil {
// One-character symbols that can be used to indicate an extension.
String singleExtnSymbolsForMatching = "x\uFF58#\uFF03~\uFF5E";
// For parsing, we are slightly more lenient in our interpretation than for matching. Here we
- // allow a "comma" as a possible extension indicator. When matching, this is hardly ever used to
- // indicate this.
- String singleExtnSymbolsForParsing = "," + singleExtnSymbolsForMatching;
+ // allow "comma" and "semicolon" as possible extension indicators. When matching, these are
+ // hardly ever used to indicate this.
+ String singleExtnSymbolsForParsing = ",;" + singleExtnSymbolsForMatching;
EXTN_PATTERNS_FOR_PARSING = createExtnPattern(singleExtnSymbolsForParsing);
EXTN_PATTERNS_FOR_MATCHING = createExtnPattern(singleExtnSymbolsForMatching);
@@ -328,9 +328,9 @@ public class PhoneNumberUtil {
private static String createExtnPattern(String singleExtnSymbols) {
// There are three regular expressions here. The first covers RFC 3966 format, where the
// extension is added using ";ext=". The second more generic one starts with optional white
- // space and ends with an optional full stop (.), followed by zero or more spaces/tabs and then
- // the numbers themselves. The other one covers the special case of American numbers where the
- // extension is written with a hash at the end, such as "- 503#".
+ // space and ends with an optional full stop (.), followed by zero or more spaces/tabs/commas
+ // and then the numbers themselves. The other one covers the special case of American numbers
+ // where the extension is written with a hash at the end, such as "- 503#"
// Note that the only capturing groups should be around the digits that you want to capture as
// part of the extension, or else parsing will fail!
// Canonical-equivalence doesn't seem to be an option with Android java, so we allow two options
@@ -440,9 +440,25 @@ public class PhoneNumberUtil {
* Possible outcomes when testing if a PhoneNumber is possible.
*/
public enum ValidationResult {
+ /** The number length matches that of valid numbers for this region. */
IS_POSSIBLE,
+ /**
+ * The number length matches that of local numbers for this region only (i.e. numbers that may
+ * be able to be dialled within an area, but do not have all the information to be dialled from
+ * anywhere inside or outside the country).
+ */
+ IS_POSSIBLE_LOCAL_ONLY,
+ /** The number has an invalid country calling code. */
INVALID_COUNTRY_CODE,
+ /** The number is shorter than all valid numbers for this region. */
TOO_SHORT,
+ /**
+ * The number is longer than the shortest valid numbers for this region, shorter than the
+ * longest valid numbers for this region, and does not itself have a number length that matches
+ * valid numbers for this region.
+ */
+ INVALID_LENGTH,
+ /** The number is longer than all valid numbers for this region. */
TOO_LONG,
}
@@ -728,7 +744,7 @@ public class PhoneNumberUtil {
* @param number a string of characters representing a phone number
* @return the normalized string version of the phone number
*/
- static String normalizeDiallableCharsOnly(String number) {
+ public static String normalizeDiallableCharsOnly(String number) {
return normalizeHelper(number, DIALLABLE_CHAR_MAPPINGS, true /* remove non matches */);
}
@@ -2135,7 +2151,11 @@ public class PhoneNumberUtil {
/**
* Tests whether a phone number matches a valid pattern. Note this doesn't verify the number
- * is actually in use, which is impossible to tell by just looking at a number itself.
+ * is actually in use, which is impossible to tell by just looking at a number itself. It only
+ * verifies whether the parsed, canonicalised number is valid: not whether a particular series of
+ * digits entered by the user is diallable from the region provided when parsing. For example, the
+ * number +41 (0) 78 927 2696 can be parsed into a number with country code "41" and national
+ * significant number "789272696". This is valid, while the original string is not diallable.
*
* @param number the phone number that we want to validate
* @return a boolean that indicates whether the number is of a valid pattern
@@ -2923,6 +2943,9 @@ public class PhoneNumberUtil {
* parse() method, with the exception that it allows the default region to be null, for use by
* isNumberMatch(). checkRegion should be set to false if it is permitted for the default region
* to be null or unknown ("ZZ").
+ *
+ * Note if any new field is added to this method that should always be filled in, even when
+ * keepRawInput is false, it should also be handled in the copyCoreFieldsOnly() method.
*/
private void parseHelper(String numberToParse, String defaultRegion, boolean keepRawInput,
boolean checkRegion, PhoneNumber phoneNumber)
@@ -3086,6 +3109,26 @@ public class PhoneNumberUtil {
}
/**
+ * Returns a new phone number containing only the fields needed to uniquely identify a phone
+ * number, rather than any fields that capture the context in which the phone number was created.
+ * These fields correspond to those set in parse() rather than parseHelper().
+ */
+ private static PhoneNumber copyCoreFieldsOnly(PhoneNumber phoneNumberIn) {
+ PhoneNumber phoneNumber = new PhoneNumber();
+ phoneNumber.setCountryCode(phoneNumberIn.getCountryCode());
+ phoneNumber.setNationalNumber(phoneNumberIn.getNationalNumber());
+ if (phoneNumberIn.getExtension().length() > 0) {
+ phoneNumber.setExtension(phoneNumberIn.getExtension());
+ }
+ if (phoneNumberIn.isItalianLeadingZero()) {
+ phoneNumber.setItalianLeadingZero(true);
+ // This field is only relevant if there are leading zeros at all.
+ phoneNumber.setNumberOfLeadingZeros(phoneNumberIn.getNumberOfLeadingZeros());
+ }
+ return phoneNumber;
+ }
+
+ /**
* Takes two phone numbers and compares them for equality.
*
* <p>Returns EXACT_MATCH if the country_code, NSN, presence of a leading zero for Italian numbers
@@ -3106,27 +3149,10 @@ public class PhoneNumberUtil {
* of the two numbers, described in the method definition.
*/
public MatchType isNumberMatch(PhoneNumber firstNumberIn, PhoneNumber secondNumberIn) {
- // Make copies of the phone number so that the numbers passed in are not edited.
- PhoneNumber firstNumber = new PhoneNumber();
- firstNumber.mergeFrom(firstNumberIn);
- PhoneNumber secondNumber = new PhoneNumber();
- secondNumber.mergeFrom(secondNumberIn);
- // First clear raw_input, country_code_source and preferred_domestic_carrier_code fields and any
- // empty-string extensions so that we can use the proto-buffer equality method.
- firstNumber.clearRawInput();
- firstNumber.clearCountryCodeSource();
- firstNumber.clearPreferredDomesticCarrierCode();
- secondNumber.clearRawInput();
- secondNumber.clearCountryCodeSource();
- secondNumber.clearPreferredDomesticCarrierCode();
- if (firstNumber.hasExtension()
- && firstNumber.getExtension().length() == 0) {
- firstNumber.clearExtension();
- }
- if (secondNumber.hasExtension()
- && secondNumber.getExtension().length() == 0) {
- secondNumber.clearExtension();
- }
+ // We only care about the fields that uniquely define a number, so we copy these across
+ // explicitly.
+ PhoneNumber firstNumber = copyCoreFieldsOnly(firstNumberIn);
+ PhoneNumber secondNumber = copyCoreFieldsOnly(secondNumberIn);
// Early exit if both had extensions and these are different.
if (firstNumber.hasExtension() && secondNumber.hasExtension()
&& !firstNumber.getExtension().equals(secondNumber.getExtension())) {
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumberInfo.java b/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumberInfo.java
index 64c15341..411b19e9 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumberInfo.java
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumberInfo.java
@@ -109,30 +109,6 @@ public class ShortNumberInfo {
}
/**
- * Check whether a short number is a possible number when dialled from a region, given the number
- * in the form of a string, and the region where the number is dialed from. This provides a more
- * lenient check than {@link #isValidShortNumberForRegion}.
- *
- * @param shortNumber the short number to check as a string
- * @param regionDialingFrom the region from which the number is dialed
- * @return whether the number is a possible short number
- * @deprecated Anyone who was using it and passing in a string with whitespace (or other
- * formatting characters) would have been getting the wrong result. You should parse
- * the string to PhoneNumber and use the method
- * {@code #isPossibleShortNumberForRegion(PhoneNumber, String)}. This method will be
- * removed in the next release.
- */
- @Deprecated
- public boolean isPossibleShortNumberForRegion(String shortNumber, String regionDialingFrom) {
- PhoneMetadata phoneMetadata =
- MetadataManager.getShortNumberMetadataForRegion(regionDialingFrom);
- if (phoneMetadata == null) {
- return false;
- }
- return phoneMetadata.getGeneralDesc().getPossibleLengthList().contains(shortNumber.length());
- }
-
- /**
* Check whether a short number is a possible number when dialed from the given region. This
* provides a more lenient check than {@link #isValidShortNumberForRegion}.
*
@@ -182,35 +158,6 @@ public class ShortNumberInfo {
* the number is actually in use, which is impossible to tell by just looking at the number
* itself.
*
- * @param shortNumber the short number to check as a string
- * @param regionDialingFrom the region from which the number is dialed
- * @return whether the short number matches a valid pattern
- * @deprecated Anyone who was using it and passing in a string with whitespace (or other
- * formatting characters) would have been getting the wrong result. You should parse
- * the string to PhoneNumber and use the method
- * {@code #isValidShortNumberForRegion(PhoneNumber, String)}. This method will be
- * removed in the next release.
- */
- @Deprecated
- public boolean isValidShortNumberForRegion(String shortNumber, String regionDialingFrom) {
- PhoneMetadata phoneMetadata =
- MetadataManager.getShortNumberMetadataForRegion(regionDialingFrom);
- if (phoneMetadata == null) {
- return false;
- }
- PhoneNumberDesc generalDesc = phoneMetadata.getGeneralDesc();
- if (!matchesPossibleNumberAndNationalNumber(shortNumber, generalDesc)) {
- return false;
- }
- PhoneNumberDesc shortNumberDesc = phoneMetadata.getShortCode();
- return matchesPossibleNumberAndNationalNumber(shortNumber, shortNumberDesc);
- }
-
- /**
- * Tests whether a short number matches a valid pattern in a region. Note that this doesn't verify
- * the number is actually in use, which is impossible to tell by just looking at the number
- * itself.
- *
* @param number the short number for which we want to test the validity
* @param regionDialingFrom the region from which the number is dialed
* @return whether the short number matches a valid pattern
@@ -254,67 +201,6 @@ public class ShortNumberInfo {
}
/**
- * Gets the expected cost category of a short number when dialled from a region (however, nothing
- * is implied about its validity). If it is important that the number is valid, then its validity
- * must first be checked using {@link isValidShortNumberForRegion}. Note that emergency numbers
- * are always considered toll-free. Example usage:
- * <pre>{@code
- * ShortNumberInfo shortInfo = ShortNumberInfo.getInstance();
- * String shortNumber = "110";
- * String regionCode = "FR";
- * if (shortInfo.isValidShortNumberForRegion(shortNumber, regionCode)) {
- * ShortNumberInfo.ShortNumberCost cost = shortInfo.getExpectedCostForRegion(shortNumber,
- * regionCode);
- * // Do something with the cost information here.
- * }}</pre>
- *
- * @param shortNumber the short number for which we want to know the expected cost category,
- * as a string
- * @param regionDialingFrom the region from which the number is dialed
- * @return the expected cost category for that region of the short number. Returns UNKNOWN_COST if
- * the number does not match a cost category. Note that an invalid number may match any cost
- * category.
- * @deprecated Anyone who was using it and passing in a string with whitespace (or other
- * formatting characters) would have been getting the wrong result. You should parse
- * the string to PhoneNumber and use the method
- * {@code #getExpectedCostForRegion(PhoneNumber, String)}. This method will be
- * removed in the next release.
- */
- @Deprecated
- public ShortNumberCost getExpectedCostForRegion(String shortNumber, String regionDialingFrom) {
- // Note that regionDialingFrom may be null, in which case phoneMetadata will also be null.
- PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(
- regionDialingFrom);
- if (phoneMetadata == null) {
- return ShortNumberCost.UNKNOWN_COST;
- }
-
- // The possible lengths are not present for a particular sub-type if they match the general
- // description; for this reason, we check the possible lengths against the general description
- // first to allow an early exit if possible.
- if (!phoneMetadata.getGeneralDesc().getPossibleLengthList().contains(shortNumber.length())) {
- return ShortNumberCost.UNKNOWN_COST;
- }
-
- // The cost categories are tested in order of decreasing expense, since if for some reason the
- // patterns overlap the most expensive matching cost category should be returned.
- if (matchesPossibleNumberAndNationalNumber(shortNumber, phoneMetadata.getPremiumRate())) {
- return ShortNumberCost.PREMIUM_RATE;
- }
- if (matchesPossibleNumberAndNationalNumber(shortNumber, phoneMetadata.getStandardRate())) {
- return ShortNumberCost.STANDARD_RATE;
- }
- if (matchesPossibleNumberAndNationalNumber(shortNumber, phoneMetadata.getTollFree())) {
- return ShortNumberCost.TOLL_FREE;
- }
- if (isEmergencyNumber(shortNumber, regionDialingFrom)) {
- // Emergency numbers are implicitly toll-free.
- return ShortNumberCost.TOLL_FREE;
- }
- return ShortNumberCost.UNKNOWN_COST;
- }
-
- /**
* Gets the expected cost category of a short number when dialed from a region (however, nothing
* is implied about its validity). If it is important that the number is valid, then its validity
* must first be checked using {@link #isValidShortNumberForRegion}. Note that emergency numbers
@@ -570,8 +456,9 @@ public class ShortNumberInfo {
/**
* Given a valid short number, determines whether it is carrier-specific (however, nothing is
- * implied about its validity). If it is important that the number is valid, then its validity
- * must first be checked using {@link #isValidShortNumber} or
+ * implied about its validity). Carrier-specific numbers may connect to a different end-point, or
+ * not connect at all, depending on the user's carrier. If it is important that the number is
+ * valid, then its validity must first be checked using {@link #isValidShortNumber} or
* {@link #isValidShortNumberForRegion}.
*
* @param number the valid short number to check
@@ -589,6 +476,31 @@ public class ShortNumberInfo {
}
/**
+ * Given a valid short number, determines whether it is carrier-specific when dialed from the
+ * given region (however, nothing is implied about its validity). Carrier-specific numbers may
+ * connect to a different end-point, or not connect at all, depending on the user's carrier. If
+ * it is important that the number is valid, then its validity must first be checked using
+ * {@link #isValidShortNumber} or {@link #isValidShortNumberForRegion}. Returns false if the
+ * number doesn't match the region provided.
+ *
+ * @param number the valid short number to check
+ * @param regionDialingFrom the region from which the number is dialed
+ * @return whether the short number is carrier-specific (assuming the input was a valid short
+ * number)
+ */
+ public boolean isCarrierSpecificForRegion(PhoneNumber number, String regionDialingFrom) {
+ if (!regionDialingFromMatchesNumber(number, regionDialingFrom)) {
+ return false;
+ }
+ String nationalNumber = getNationalSignificantNumber(number);
+ PhoneMetadata phoneMetadata =
+ MetadataManager.getShortNumberMetadataForRegion(regionDialingFrom);
+ return (phoneMetadata != null)
+ && (matchesPossibleNumberAndNationalNumber(nationalNumber,
+ phoneMetadata.getCarrierSpecific()));
+ }
+
+ /**
* Gets the national significant number of the a phone number. Note a national significant number
* doesn't contain a national prefix or any formatting.
* <p>
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_52 b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_52
new file mode 100644
index 00000000..7237f353
--- /dev/null
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_52
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_62 b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_62
index 8763d3c0..fbb8358d 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_62
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_62
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_91 b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_91
index f63b8ecf..12c66989 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_91
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_91
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM
index 133749e9..36c874a8 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR
index f144d417..92021a28 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU
index c38142ea..cc4f2057 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AX b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AX
index c49284b7..64efd0bc 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AX
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AX
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD
index db34b164..b5d5b77d 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR
index 5bfbad3a..fd657662 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY
index b3b45f02..d20d1f4a 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ
index 2adb9d0d..d9935ea3 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI
index 40aa23b6..7e0cb7a5 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL
index 200270ef..95d08946 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN
index f346112e..0a737d43 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR
index 85d70f55..32296909 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE
index d8c90da5..c7ef9a0d 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ
index ff1afa98..3694bd9a 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES
index c7768ae0..5185e9ff 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR
index c32a8a9a..bb5f3a24 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB
index 352093b8..0bc61c8c 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG
index 7007b86f..2579c4f8 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH
index 1fecc90e..c30a94d8 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW
index 919977d8..66bf9acd 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY
index 1558eed1..64c8e06d 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN
index 43328190..e476fa1a 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID
index e967b394..5fcac083 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL
index c9fd4d9f..6114a5ec 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM
index 077cc442..b80162bb 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN
index e13ee4a5..fc2700be 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE
index c06da063..589fcd3e 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI
index 2260749d..f5a2bc64 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM
index 73d0bba1..df7bd79f 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR
index 59aa286e..c4f6fa10 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ
index 2a66b570..614a5e1a 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI
index da168e1a..d1ee0c65 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA
index 490ec115..4694de55 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC
index ec245997..d00b4576 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM
index 0b9138e9..11d2a683 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ
index 535000da..5f1735df 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU
index 95cfbf63..4d32644c 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ
index 43884094..e40dca45 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA
index a6f69505..79eb6e77 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG
index 2ad931ff..926417ff 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG
index 32c27f8e..3414a623 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE
index 232d9ecd..56534434 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO
index 04442155..9734328f 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC
index 66533083..2abf09a0 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SJ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SJ
index cbefc3bd..72788706 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SJ
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SJ
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK
index fc3ba09b..679f0c63 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO
index a01d6556..603f4f68 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG
index 669ea179..79f4cc42 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ
index e1970b12..b307f196 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT
index 2cd293ae..5643954e 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ
index 0b698b38..5698f51d 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA
index 2a1b53d2..948d1be6 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US
index 3f8e130c..659a1cee 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN
index 1707e1d9..e4353ba4 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA
index 4eeb0dd7..edfc0daf 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BH b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BH
index fe297519..c40e3553 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BH
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BH
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BR b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BR
index c2f6b90d..a3c5da02 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BR
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BR
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HR b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HR
index 6d4ac377..fb9c5ce9 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HR
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HR
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KI b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KI
index f2f8f25f..29e6874d 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KI
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KI
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MV b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MV
index d1bdd2ad..35a9d1ae 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MV
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MV
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MY b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MY
index 85b46aed..7187f733 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MY
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MY
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SK b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SK
index 12bda012..f58b250e 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SK
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SK
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TG b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TG
index d73857b4..db05dcaa 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TG
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TG
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZA b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZA
index f4c1c6b2..1d72a419 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZA
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZA
Binary files differ