/external/libphonenumber/libphonenumber/test/com/google/i18n/phonenumbers/ |
D | PhoneNumberUtilTest.java | 117 assertTrue(phoneUtil.getSupportedRegions().size() > 0); in testGetSupportedRegions() 122 phoneUtil.getSupportedGlobalNetworkCallingCodes(); in testGetSupportedGlobalNetworkCallingCodes() 126 assertEquals(RegionCode.UN001, phoneUtil.getRegionCodeForCountryCode(callingCode)); in testGetSupportedGlobalNetworkCallingCodes() 131 assertNull(phoneUtil.getMetadataForRegion("No Such Region")); in testGetInstanceLoadBadMetadata() 132 assertNull(phoneUtil.getMetadataForNonGeographicalRegion(-1)); in testGetInstanceLoadBadMetadata() 140 phoneUtil.loadMetadataFromFile( in testMissingMetadataFileThrowsRuntimeException() 147 phoneUtil.loadMetadataFromFile("no/such/file", PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY, in testMissingMetadataFileThrowsRuntimeException() 156 PhoneMetadata metadata = phoneUtil.getMetadataForRegion(RegionCode.US); in testGetInstanceLoadUSMetadata() 177 PhoneMetadata metadata = phoneUtil.getMetadataForRegion(RegionCode.DE); in testGetInstanceLoadDEMetadata() 197 PhoneMetadata metadata = phoneUtil.getMetadataForRegion(RegionCode.AR); in testGetInstanceLoadARMetadata() [all …]
|
D | TestMetadataTestCase.java | 33 protected final PhoneNumberUtil phoneUtil; field in TestMetadataTestCase 36 phoneUtil = initializePhoneUtilForTesting(); in TestMetadataTestCase() 40 PhoneNumberUtil phoneUtil = new PhoneNumberUtil( in initializePhoneUtilForTesting() local 43 PhoneNumberUtil.setInstance(phoneUtil); in initializePhoneUtilForTesting() 44 return phoneUtil; in initializePhoneUtilForTesting()
|
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() 652 hasNoMatches(phoneUtil.findNumbers(text, region))); in findMatchesInContexts() 661 hasNoMatches(phoneUtil.findNumbers(text, region, Leniency.POSSIBLE, in findMatchesInContexts() [all …]
|
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 | 338 return phoneUtil.parse(number, regionCode); in parse()
|
/external/libphonenumber/demo/src/com/google/phonenumbers/ |
D | PhoneNumberParserServlet.java | 55 private PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); field in PhoneNumberParserServlet 137 PhoneNumber number = phoneUtil.parseAndKeepRawInput(numberStr, defaultCountry); in getOutputForFile() 138 boolean isNumberValid = phoneUtil.isValidNumber(number); in getOutputForFile() 140 ? phoneUtil.formatInOriginalFormat(number, defaultCountry) in getOutputForFile() 143 ? phoneUtil.format(number, PhoneNumberFormat.INTERNATIONAL) in getOutputForFile() 173 PhoneNumber number = phoneUtil.parseAndKeepRawInput(phoneNumber, defaultCountry); in getOutputForSingleNumber() 187 boolean isPossible = phoneUtil.isPossibleNumber(number); in getOutputForSingleNumber() 188 boolean isNumberValid = phoneUtil.isValidNumber(number); in getOutputForSingleNumber() 189 PhoneNumberType numberType = phoneUtil.getNumberType(number); in getOutputForSingleNumber() 197 phoneUtil.isPossibleNumberWithReason(number).toString(), output); in getOutputForSingleNumber() [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() 117 String nationalNumber = phoneUtil.getNationalSignificantNumber(number); in getDescriptionForValidNumber() 122 String region = phoneUtil.getRegionCodeForCountryCode(number.getCountryCode()); in getDescriptionForValidNumber() 125 copiedNumber = phoneUtil.parse(nationalNumber, region); in getDescriptionForValidNumber() 166 String regionCode = phoneUtil.getRegionCodeForNumber(number); in getDescriptionForValidNumber() 186 PhoneNumberType numberType = phoneUtil.getNumberType(number); in getDescriptionForNumber() 209 PhoneNumberType numberType = phoneUtil.getNumberType(number); in getDescriptionForNumber()
|
/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/libphonenumber/src/com/google/i18n/phonenumbers/ |
D | AsYouTypeFormatter.java | 58 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); field in AsYouTypeFormatter 136 int countryCallingCode = phoneUtil.getCountryCodeForRegion(regionCode); in getMetadataForRegion() 137 String mainCountry = phoneUtil.getRegionCodeForCountryCode(countryCallingCode); in getMetadataForRegion() 138 PhoneMetadata metadata = phoneUtil.getMetadataForRegion(mainCountry); in getMetadataForRegion() 600 int countryCode = phoneUtil.extractCountryCode(nationalNumber, numberWithoutCountryCallingCode); in attemptToExtractCountryCallingCode() 606 String newRegionCode = phoneUtil.getRegionCodeForCountryCode(countryCode); in attemptToExtractCountryCallingCode() 608 currentMetadata = phoneUtil.getMetadataForNonGeographicalRegion(countryCode); in attemptToExtractCountryCallingCode()
|
D | PhoneNumberMatcher.java | 190 private final PhoneNumberUtil phoneUtil; field in PhoneNumberMatcher 234 this.phoneUtil = util; in PhoneNumberMatcher() 415 PhoneNumber number = phoneUtil.parseAndKeepRawInput(candidate, preferredRegion); in parseAndVerify() 429 if (phoneUtil.getRegionCodeForCountryCode(number.getCountryCode()).equals("IL") && in parseAndVerify() 430 phoneUtil.getNationalSignificantNumber(number).length() == 4 && in parseAndVerify() 436 if (leniency.verify(number, candidate, phoneUtil)) { 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()
|