/external/libphonenumber/libphonenumber/test/com/google/i18n/phonenumbers/ |
D | PhoneNumberUtilTest.java | 123 assertTrue(phoneUtil.getSupportedRegions().size() > 0); in testGetSupportedRegions() 128 phoneUtil.getSupportedGlobalNetworkCallingCodes(); in testGetSupportedGlobalNetworkCallingCodes() 132 assertEquals(RegionCode.UN001, phoneUtil.getRegionCodeForCountryCode(callingCode)); in testGetSupportedGlobalNetworkCallingCodes() 137 Set<Integer> callingCodes = phoneUtil.getSupportedCallingCodes(); in testGetSupportedCallingCodes() 141 assertTrue(phoneUtil.getRegionCodeForCountryCode(callingCode) != RegionCode.ZZ); in testGetSupportedCallingCodes() 144 assertTrue(callingCodes.size() > phoneUtil.getSupportedGlobalNetworkCallingCodes().size()); in testGetSupportedCallingCodes() 150 assertNull(phoneUtil.getMetadataForRegion("No Such Region")); in testGetInstanceLoadBadMetadata() 151 assertNull(phoneUtil.getMetadataForNonGeographicalRegion(-1)); in testGetInstanceLoadBadMetadata() 155 assertTrue(phoneUtil.getSupportedTypesForRegion(RegionCode.BR) in testGetSupportedTypesForRegion() 158 assertFalse(phoneUtil.getSupportedTypesForRegion(RegionCode.BR) in testGetSupportedTypesForRegion() [all …]
|
D | PhoneNumberMatcherTest.java | 251 phoneUtil.findNumbers(text, RegionCode.US).iterator(); in testFourMatchesInARow() 271 phoneUtil.findNumbers(text, RegionCode.US).iterator(); in testMatchesFoundWithMultipleSpaces() 284 phoneUtil.findNumbers(zipPreceding, RegionCode.US).iterator(); in testMatchWithSurroundingZipcodes() 292 iterator = phoneUtil.findNumbers(zipFollowing, RegionCode.US).iterator(); in testMatchWithSurroundingZipcodes() 404 number1.setCountryCode(phoneUtil.getCountryCodeForRegion(region)); in testMatchesMultiplePhoneNumbersSeparatedByPhoneNumberPunctuation() 409 number2.setCountryCode(phoneUtil.getCountryCodeForRegion(region)); in testMatchesMultiplePhoneNumbersSeparatedByPhoneNumberPunctuation() 413 Iterator<PhoneNumberMatch> matches = phoneUtil.findNumbers(text, region).iterator(); in testMatchesMultiplePhoneNumbersSeparatedByPhoneNumberPunctuation() 423 assertTrue(hasNoMatches(phoneUtil.findNumbers(text, region))); in testDoesNotMatchMultiplePhoneNumbersSeparatedWithNoWhiteSpace() 654 hasNoMatches(phoneUtil.findNumbers(text, region))); in findMatchesInContexts() 663 hasNoMatches(phoneUtil.findNumbers(text, region, Leniency.POSSIBLE, in findMatchesInContexts() [all …]
|
D | TestMetadataTestCase.java | 40 protected final PhoneNumberUtil phoneUtil; field in TestMetadataTestCase 43 phoneUtil = new PhoneNumberUtil(new MultiFileMetadataSourceImpl(TEST_METADATA_FILE_PREFIX, in TestMetadataTestCase() 51 PhoneNumberUtil.setInstance(phoneUtil); in setUp()
|
D | AsYouTypeFormatterTest.java | 30 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.ZZ); in testInvalidRegion() 52 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.ZZ); in testInvalidPlusSign() 72 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.ZZ); in testTooLongNumberMatchingMultipleLeadingDigits() 92 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.BY); in testCountryWithSpaceInNationalPrefixFormattingRule() 107 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.BY); in testCountryWithSpaceInNationalPrefixFormattingRuleAndLongNdd() 121 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.US); in testAYTFUS() 215 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.US); in testAYTFUSFullWidthCharacters() 229 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.US); in testAYTFUSMobileShortCode() 238 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.US); in testAYTFUSVanityNumber() 254 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.US); in testAYTFAndRememberPositionUS() [all …]
|
D | ShortNumberInfoTest.java | 367 return phoneUtil.parse(number, regionCode); in parse()
|
/external/libphonenumber/repackaged/geocoder/src/com/android/i18n/phonenumbers/geocoding/ |
D | PhoneNumberOfflineGeocoder.java | 41 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); field in PhoneNumberOfflineGeocoder 71 phoneUtil.getRegionCodesForCountryCode(number.getCountryCode()); in getCountryNameForNumber() 77 if (phoneUtil.isValidNumberForRegion(number, regionCode)) { in getCountryNameForNumber() 122 String nationalNumber = phoneUtil.getNationalSignificantNumber(number); in getDescriptionForValidNumber() 127 String region = phoneUtil.getRegionCodeForCountryCode(number.getCountryCode()); in getDescriptionForValidNumber() 130 copiedNumber = phoneUtil.parse(nationalNumber, region); in getDescriptionForValidNumber() 172 String regionCode = phoneUtil.getRegionCodeForNumber(number); in getDescriptionForValidNumber() 193 PhoneNumberType numberType = phoneUtil.getNumberType(number); in getDescriptionForNumber() 196 } else if (!phoneUtil.isNumberGeographical(numberType, number.getCountryCode())) { in getDescriptionForNumber() 216 PhoneNumberType numberType = phoneUtil.getNumberType(number); in getDescriptionForNumber() [all …]
|
/external/libphonenumber/geocoder/src/com/google/i18n/phonenumbers/geocoding/ |
D | PhoneNumberOfflineGeocoder.java | 39 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); field in PhoneNumberOfflineGeocoder 68 phoneUtil.getRegionCodesForCountryCode(number.getCountryCode()); in getCountryNameForNumber() 74 if (phoneUtil.isValidNumberForRegion(number, regionCode)) { in getCountryNameForNumber() 119 String nationalNumber = phoneUtil.getNationalSignificantNumber(number); in getDescriptionForValidNumber() 124 String region = phoneUtil.getRegionCodeForCountryCode(number.getCountryCode()); in getDescriptionForValidNumber() 127 copiedNumber = phoneUtil.parse(nationalNumber, region); in getDescriptionForValidNumber() 169 String regionCode = phoneUtil.getRegionCodeForNumber(number); in getDescriptionForValidNumber() 189 PhoneNumberType numberType = phoneUtil.getNumberType(number); in getDescriptionForNumber() 192 } else if (!phoneUtil.isNumberGeographical(numberType, number.getCountryCode())) { in getDescriptionForNumber() 212 PhoneNumberType numberType = phoneUtil.getNumberType(number); in getDescriptionForNumber() [all …]
|
/external/libphonenumber/demo/src/com/google/phonenumbers/ |
D | PhoneNumberParserServlet.java | 62 private PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); field in PhoneNumberParserServlet 161 PhoneNumber number = phoneUtil.parseAndKeepRawInput(numberStr, defaultCountry); in getOutputForFile() 162 boolean isNumberValid = phoneUtil.isValidNumber(number); in getOutputForFile() 164 ? phoneUtil.formatInOriginalFormat(number, defaultCountry) in getOutputForFile() 167 ? phoneUtil.format(number, PhoneNumberFormat.INTERNATIONAL) in getOutputForFile() 256 PhoneNumber number = phoneUtil.parseAndKeepRawInput(phoneNumber, defaultCountry); in getOutputForSingleNumber() 270 boolean isPossible = phoneUtil.isPossibleNumber(number); in getOutputForSingleNumber() 271 boolean isNumberValid = phoneUtil.isValidNumber(number); in getOutputForSingleNumber() 272 PhoneNumberType numberType = phoneUtil.getNumberType(number); in getOutputForSingleNumber() 281 phoneUtil.isPossibleNumberWithReason(number).toString(), output); in getOutputForSingleNumber() [all …]
|
/external/libphonenumber/carrier/src/com/google/i18n/phonenumbers/ |
D | PhoneNumberToCarrierMapper.java | 37 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); field in PhoneNumberToCarrierMapper 92 PhoneNumberType numberType = phoneUtil.getNumberType(number); in getNameForNumber() 110 if (phoneUtil.isMobileNumberPortableRegion(phoneUtil.getRegionCodeForNumber(number))) { in getSafeDisplayName()
|
/external/libphonenumber/repackaged/libphonenumber/src/com/android/i18n/phonenumbers/ |
D | AsYouTypeFormatter.java | 60 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); field in AsYouTypeFormatter 128 int countryCallingCode = phoneUtil.getCountryCodeForRegion(regionCode); in getMetadataForRegion() 129 String mainCountry = phoneUtil.getRegionCodeForCountryCode(countryCallingCode); in getMetadataForRegion() 130 PhoneMetadata metadata = phoneUtil.getMetadataForRegion(mainCountry); in getMetadataForRegion() 611 int countryCode = phoneUtil.extractCountryCode(nationalNumber, numberWithoutCountryCallingCode); in attemptToExtractCountryCallingCode() 617 String newRegionCode = phoneUtil.getRegionCodeForCountryCode(countryCode); in attemptToExtractCountryCallingCode() 619 currentMetadata = phoneUtil.getMetadataForNonGeographicalRegion(countryCode); in attemptToExtractCountryCallingCode()
|
D | PhoneNumberMatcher.java | 191 private final PhoneNumberUtil phoneUtil; field in PhoneNumberMatcher 241 this.phoneUtil = util; in PhoneNumberMatcher() 421 PhoneNumber number = phoneUtil.parseAndKeepRawInput(candidate, preferredRegion); in parseAndVerify() 423 if (leniency.verify(number, candidate, phoneUtil, this)) { in parseAndVerify()
|
/external/libphonenumber/libphonenumber/src/com/google/i18n/phonenumbers/ |
D | AsYouTypeFormatter.java | 58 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); field in AsYouTypeFormatter 126 int countryCallingCode = phoneUtil.getCountryCodeForRegion(regionCode); in getMetadataForRegion() 127 String mainCountry = phoneUtil.getRegionCodeForCountryCode(countryCallingCode); in getMetadataForRegion() 128 PhoneMetadata metadata = phoneUtil.getMetadataForRegion(mainCountry); in getMetadataForRegion() 605 int countryCode = phoneUtil.extractCountryCode(nationalNumber, numberWithoutCountryCallingCode); in attemptToExtractCountryCallingCode() 611 String newRegionCode = phoneUtil.getRegionCodeForCountryCode(countryCode); in attemptToExtractCountryCallingCode() 613 currentMetadata = phoneUtil.getMetadataForNonGeographicalRegion(countryCode); in attemptToExtractCountryCallingCode()
|
D | PhoneNumberMatcher.java | 190 private final PhoneNumberUtil phoneUtil; field in PhoneNumberMatcher 240 this.phoneUtil = util; in PhoneNumberMatcher() 420 PhoneNumber number = phoneUtil.parseAndKeepRawInput(candidate, preferredRegion); in parseAndVerify() 422 if (leniency.verify(number, candidate, phoneUtil, this)) { in parseAndVerify()
|
/external/libphonenumber/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/ |
D | PhonePrefixMap.java | 39 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); field in PhonePrefixMap 182 Long.parseLong(number.getCountryCode() + phoneUtil.getNationalSignificantNumber(number)); in lookup()
|
/external/libphonenumber/repackaged/internal/prefixmapper/src/com/android/i18n/phonenumbers/prefixmapper/ |
D | PhonePrefixMap.java | 41 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); field in PhonePrefixMap 184 Long.parseLong(number.getCountryCode() + phoneUtil.getNationalSignificantNumber(number)); in lookup()
|