Home
last modified time | relevance | path

Searched refs:regionCode (Results 1 – 13 of 13) sorted by relevance

/external/libphonenumber/libphonenumber/test/com/google/i18n/phonenumbers/
DExampleNumbersTest.java51 for (String regionCode : phoneNumberUtil.getSupportedRegions()) { in checkNumbersValidAndCorrectType()
53 phoneNumberUtil.getExampleNumberForType(regionCode, exampleNumberRequestedType); in checkNumbersValidAndCorrectType()
142 for (String regionCode : phoneNumberUtil.getSupportedRegions()) { in testCanBeInternationallyDialled()
145 phoneNumberUtil.getMetadataForRegion(regionCode).getNoInternationalDialling(); in testCanBeInternationallyDialled()
148 exampleNumber = phoneNumberUtil.parse(desc.getExampleNumber(), regionCode); in testCanBeInternationallyDialled()
176 for (String regionCode : phoneNumberUtil.getSupportedRegions()) { in testEveryRegionHasAnExampleNumber()
177 PhoneNumber exampleNumber = phoneNumberUtil.getExampleNumber(regionCode); in testEveryRegionHasAnExampleNumber()
178 assertNotNull("None found for region " + regionCode, exampleNumber); in testEveryRegionHasAnExampleNumber()
184 for (String regionCode : shortNumberInfo.getSupportedRegions()) { in testShortNumbersValidAndCorrectCost()
185 String exampleShortNumber = shortNumberInfo.getExampleShortNumber(regionCode); in testShortNumbersValidAndCorrectCost()
[all …]
DShortNumberInfoTest.java336 private PhoneNumber parse(String number, String regionCode) { in parse() argument
338 return phoneUtil.parse(number, regionCode); in parse()
341 "Test input data should always parse correctly: " + number + " (" + regionCode + ")", e); in parse()
DPhoneNumberMatcherTest.java1080 NumberTest(String rawString, String regionCode) { in NumberTest() argument
1082 this.region = regionCode; in NumberTest()
/external/libphonenumber/libphonenumber/src/com/google/i18n/phonenumbers/
DShortNumberInfo.java230 String regionCode = getRegionCodeForShortNumberFromRegionList(number, regionCodes); in isValidShortNumber() local
231 if (regionCodes.size() > 1 && regionCode != null) { in isValidShortNumber()
236 return isValidShortNumberForRegion(number, regionCode); in isValidShortNumber()
374 for (String regionCode : regionCodes) { in getExpectedCost()
375 ShortNumberCost costForRegion = getExpectedCostForRegion(number, regionCode); in getExpectedCost()
408 for (String regionCode : regionCodes) { in getRegionCodeForShortNumberFromRegionList()
409 PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(regionCode); in getRegionCodeForShortNumberFromRegionList()
413 return regionCode; in getRegionCodeForShortNumberFromRegionList()
434 String getExampleShortNumber(String regionCode) { in getExampleShortNumber() argument
435 PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(regionCode); in getExampleShortNumber()
[all …]
DPhoneNumberUtil.java614 void loadMetadataFromFile(String filePrefix, String regionCode, int countryCallingCode,
616 boolean isNonGeoRegion = REGION_CODE_FOR_NON_GEO_ENTITY.equals(regionCode);
618 (isNonGeoRegion ? String.valueOf(countryCallingCode) : regionCode);
640 regionToMetadataMap.put(regionCode, metadata);
1074 private boolean isValidRegionCode(String regionCode) {
1075 return regionCode != null && supportedRegions.contains(regionCode);
1142 String regionCode = getRegionCodeForCountryCode(countryCallingCode);
1146 getMetadataForRegionOrCallingCode(countryCallingCode, regionCode);
1174 String regionCode = getRegionCodeForCountryCode(countryCallingCode);
1177 getMetadataForRegionOrCallingCode(countryCallingCode, regionCode);
[all …]
DMetadataManager.java104 private static void loadShortNumberMetadataFromFile(String regionCode) { in loadShortNumberMetadataFromFile() argument
106 SHORT_NUMBER_METADATA_FILE_PREFIX + "_" + regionCode); in loadShortNumberMetadataFromFile()
113 regionCodeToShortNumberMetadataMap.put(regionCode, metadata); in loadShortNumberMetadataFromFile()
127 static PhoneMetadata getShortNumberMetadataForRegion(String regionCode) { in getShortNumberMetadataForRegion() argument
128 if (!regionCodeSet.contains(regionCode)) { in getShortNumberMetadataForRegion()
132 if (!regionCodeToShortNumberMetadataMap.containsKey(regionCode)) { in getShortNumberMetadataForRegion()
133 loadShortNumberMetadataFromFile(regionCode); in getShortNumberMetadataForRegion()
136 return regionCodeToShortNumberMetadataMap.get(regionCode); in getShortNumberMetadataForRegion()
DShortNumberUtil.java63 public boolean connectsToEmergencyNumber(String number, String regionCode) { in connectsToEmergencyNumber() argument
64 return ShortNumberInfo.getInstance().connectsToEmergencyNumber(number, regionCode); in connectsToEmergencyNumber()
77 public boolean isEmergencyNumber(String number, String regionCode) { in isEmergencyNumber() argument
78 return ShortNumberInfo.getInstance().isEmergencyNumber(number, regionCode); in isEmergencyNumber()
DAsYouTypeFormatter.java127 AsYouTypeFormatter(String regionCode) { in AsYouTypeFormatter() argument
128 defaultCountry = regionCode; in AsYouTypeFormatter()
135 private PhoneMetadata getMetadataForRegion(String regionCode) { in getMetadataForRegion() argument
136 int countryCallingCode = phoneUtil.getCountryCodeForRegion(regionCode); in getMetadataForRegion()
/external/libphonenumber/geocoder/src/com/google/i18n/phonenumbers/geocoding/
DPhoneNumberOfflineGeocoder.java73 for (String regionCode : regionCodes) { in getCountryNameForNumber()
74 if (phoneUtil.isValidNumberForRegion(number, regionCode)) { in getCountryNameForNumber()
80 regionWhereNumberIsValid = regionCode; in getCountryNameForNumber()
90 private String getRegionDisplayName(String regionCode, Locale language) { in getRegionDisplayName() argument
91 return (regionCode == null || regionCode.equals("ZZ") || in getRegionDisplayName()
92 regionCode.equals(PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY)) in getRegionDisplayName()
93 ? "" : new Locale("", regionCode).getDisplayCountry(language); in getRegionDisplayName()
166 String regionCode = phoneUtil.getRegionCodeForNumber(number); in getDescriptionForValidNumber() local
167 if (userRegion.equals(regionCode)) { in getDescriptionForValidNumber()
171 return getRegionDisplayName(regionCode, languageCode); in getDescriptionForValidNumber()
/external/libphonenumber/demo/src/com/google/phonenumbers/
DPhoneNumberParserServlet.java60 String regionCode = ""; in doPost() local
81 regionCode = Streams.asString(in).toUpperCase(); in doPost()
97 output = getOutputForSingleNumber(phoneNumber, defaultCountry, languageCode, regionCode); in doPost()
109 (regionCode.length() == 0 ? "" : " (" + regionCode + ")" + "<br>")); in doPost()
170 String phoneNumber, String defaultCountry, String languageCode, String regionCode) { in getOutputForSingleNumber() argument
263 number, new Locale(languageCode, regionCode)), in getOutputForSingleNumber()
287 number, new Locale(languageCode, regionCode)), in getOutputForSingleNumber()
/external/icu/icu4c/source/i18n/
Duregion.cpp21 uregion_getRegionFromCode(const char *regionCode, UErrorCode *status) in uregion_getRegionFromCode() argument
23 return (URegion*)Region::getInstance(regionCode, *status); in uregion_getRegionFromCode()
/external/icu/icu4c/source/i18n/unicode/
Duregion.h133 uregion_getRegionFromCode(const char *regionCode, UErrorCode *status);
/external/libphonenumber/demo/war/
Dphonenumberparser.jsp28 <input type="text" name="languageCode" size="2">-<input type="text" name="regionCode"