summaryrefslogtreecommitdiff
path: root/libphonenumber/src/com/google
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2017-02-27 16:01:34 +0000
committerPaul Duffin <paulduffin@google.com>2017-02-28 12:39:10 +0000
commiteba9dfda1f2b487b7399e2210ad5c4c5eeb83f1e (patch)
treed1af12f71d1469723d4fb6f48f42795e623daa5a /libphonenumber/src/com/google
parent864377fb67acb5b9c0097792cf769c1d2fab0809 (diff)
downloadlibphonenumber-eba9dfda1f2b487b7399e2210ad5c4c5eeb83f1e.tar.gz
Upgrade to 8.3.1
Created using ./update-from-external.sh 8.3.1 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 dx vogar --timeout 0 \ --classpath out/target/common/obj/JAVA_LIBRARIES/libphonenumber-test_intermediates/classes.jack \ com.google.i18n.phonenumbers Bug: 35655217 Test: As described above Change-Id: I58a4ea79762322603875a1be02c8a5542076191f
Diffstat (limited to 'libphonenumber/src/com/google')
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java5
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java2
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_39bin0 -> 192 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BSbin667 -> 671 bytes
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VNbin1276 -> 1280 bytes
5 files changed, 4 insertions, 3 deletions
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java b/libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java
index dbf0f354..cf94bdb2 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 58 as there are 44 different entries,
+ // The capacity is set to 60 as there are 45 different entries,
// and this offers a load factor of roughly 0.75.
- Set<Integer> countryCodeSet = new HashSet<Integer>(58);
+ Set<Integer> countryCodeSet = new HashSet<Integer>(60);
countryCodeSet.add(7);
countryCodeSet.add(27);
@@ -36,6 +36,7 @@ public class AlternateFormatsCountryCodeSet {
countryCodeSet.add(31);
countryCodeSet.add(34);
countryCodeSet.add(36);
+ countryCodeSet.add(39);
countryCodeSet.add(43);
countryCodeSet.add(44);
countryCodeSet.add(49);
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java b/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
index 90a969e2..4ce27810 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
@@ -1717,7 +1717,7 @@ public class PhoneNumberUtil {
public String getNationalSignificantNumber(PhoneNumber number) {
// If leading zero(s) have been set, we prefix this now. Note this is not a national prefix.
StringBuilder nationalNumber = new StringBuilder();
- if (number.isItalianLeadingZero()) {
+ if (number.isItalianLeadingZero() && number.getNumberOfLeadingZeros() > 0) {
char[] zeros = new char[number.getNumberOfLeadingZeros()];
Arrays.fill(zeros, '0');
nationalNumber.append(new String(zeros));
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_39 b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_39
new file mode 100644
index 00000000..50e08699
--- /dev/null
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_39
Binary files differ
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS
index 4466d852..eba5495a 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS
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 e4353ba4..3551b547 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN
Binary files differ