diff options
author | Paul Duffin <paulduffin@google.com> | 2016-09-21 11:03:29 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-09-21 11:03:29 +0000 |
commit | 78b57ad8097f172cc084be1b15ee6d2fe446c79c (patch) | |
tree | dcd4d8079e9465432536b46d12c18810ede3f554 /libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java | |
parent | 444b6caeb53aaec736cba729c2445d885a56cb38 (diff) | |
parent | edd65d0141c2d36a410335316d62a82f1f305eca (diff) | |
download | libphonenumber-78b57ad8097f172cc084be1b15ee6d2fe446c79c.tar.gz |
Merge "Upgrade to libphonenumber-7.7.0 which is nano proto free"android-n-mr1-preview-2android-n-mr1-preview-1
Diffstat (limited to 'libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java')
-rw-r--r-- | libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java b/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java index a9d918f2..c74b21ab 100644 --- a/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java +++ b/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java @@ -19,10 +19,10 @@ package com.google.i18n.phonenumbers; import com.google.i18n.phonenumbers.PhoneNumberUtil.Leniency; import com.google.i18n.phonenumbers.PhoneNumberUtil.MatchType; import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat; -import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber; +import com.google.i18n.phonenumbers.Phonemetadata.NumberFormat; +import com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata; import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource; -import com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat; -import com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata; +import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber; import java.lang.Character.UnicodeBlock; import java.util.Iterator; @@ -585,7 +585,7 @@ final class PhoneNumberMatcher implements Iterator<PhoneNumberMatch> { PhoneMetadata alternateFormats = MetadataManager.getAlternateFormatsForCountry(number.getCountryCode()); if (alternateFormats != null) { - for (NumberFormat alternateFormat : alternateFormats.numberFormat) { + for (NumberFormat alternateFormat : alternateFormats.numberFormats()) { formattedNumberGroups = getNationalNumberGroups(util, number, alternateFormat); if (checker.checkGroups(util, number, normalizedCandidate, formattedNumberGroups)) { return true; @@ -665,17 +665,17 @@ final class PhoneNumberMatcher implements Iterator<PhoneNumberMatch> { // Check if a national prefix should be present when formatting this number. String nationalNumber = util.getNationalSignificantNumber(number); NumberFormat formatRule = - util.chooseFormattingPatternForNumber(metadata.numberFormat, nationalNumber); + util.chooseFormattingPatternForNumber(metadata.numberFormats(), nationalNumber); // To do this, we check that a national prefix formatting rule was present and that it wasn't // just the first-group symbol ($1) with punctuation. - if ((formatRule != null) && formatRule.nationalPrefixFormattingRule.length() > 0) { - if (formatRule.nationalPrefixOptionalWhenFormatting) { + if ((formatRule != null) && formatRule.getNationalPrefixFormattingRule().length() > 0) { + if (formatRule.isNationalPrefixOptionalWhenFormatting()) { // The national-prefix is optional in these cases, so we don't need to check if it was // present. return true; } if (PhoneNumberUtil.formattingRuleHasFirstGroupOnly( - formatRule.nationalPrefixFormattingRule)) { + formatRule.getNationalPrefixFormattingRule())) { // National Prefix not needed for this number. return true; } |