From 1564ec20536883f6fb7c9d3aa893912d5b042ece Mon Sep 17 00:00:00 2001 From: mandlil <138015259+mandlil@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:52:22 +0530 Subject: [PATCH] Parsing issue with "(8108) 6309 390 906" (RU) --- .../src/com/google/i18n/phonenumbers/PhoneNumberUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java b/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java index e5133f8b7..bb32de77e 100644 --- a/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java +++ b/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java @@ -2877,7 +2877,9 @@ public class PhoneNumberUtil { if (defaultRegionMetadata != null) { possibleCountryIddPrefix = defaultRegionMetadata.getInternationalPrefix(); if ( defaultRegionMetadata.getId().equals("RU") && possibleCountryIddPrefix.contains("810")) { - possibleCountryIddPrefix = "00"; + if (new String(fullNumber).startsWith("8108")) { + possibleCountryIddPrefix = "00"; + } } }