Searched refs:PhoneNumberUtil (Results 1 - 25 of 25) sorted by relevance

/external/libphonenumber/java/test/com/android/i18n/phonenumbers/
H A DTestMetadataTestCase.java22 * Root class for PhoneNumberUtil tests that depend on the test metadata file.
33 protected final PhoneNumberUtil phoneUtil;
39 static PhoneNumberUtil initializePhoneUtilForTesting() {
40 PhoneNumberUtil phoneUtil = new PhoneNumberUtil(
41 TEST_META_DATA_FILE_PREFIX, PhoneNumberUtil.DEFAULT_METADATA_LOADER,
43 PhoneNumberUtil.setInstance(phoneUtil);
H A DPhoneNumberUtilTest.java19 import com.android.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
30 * Unit tests for PhoneNumberUtil.java
130 "no/such/file", "XX", -1, PhoneNumberUtil.DEFAULT_METADATA_LOADER);
136 phoneUtil.loadMetadataFromFile("no/such/file", PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY,
137 123, PhoneNumberUtil.DEFAULT_METADATA_LOADER);
296 assertEquals("1", PhoneNumberUtil.getCountryMobileToken(phoneUtil.getCountryCodeForRegion(
300 assertEquals("", PhoneNumberUtil.getCountryMobileToken(phoneUtil.getCountryCodeForRegion(
321 PhoneNumberUtil.PhoneNumberType.FIXED_LINE));
324 PhoneNumberUtil.PhoneNumberType.MOBILE));
328 PhoneNumberUtil
[all...]
H A DExampleNumbersTest.java19 import com.android.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
38 private PhoneNumberUtil phoneNumberUtil =
39 PhoneNumberUtil.createInstance(PhoneNumberUtil.DEFAULT_METADATA_LOADER);
H A DPhoneNumberMatcherTest.java19 import com.android.i18n.phonenumbers.PhoneNumberUtil.Leniency;
212 // The next test differs from PhoneNumberUtil -> when matching we don't consider a lone comma to
940 * Tests numbers found by {@link PhoneNumberUtil#findNumbers(CharSequence, String)} in various
/external/chromium_org/components/autofill/core/browser/
H A Dphone_number_i18n.cc17 using i18n::phonenumbers::PhoneNumberUtil;
33 PhoneNumberUtil* phone_util = PhoneNumberUtil::GetInstance();
59 PhoneNumberUtil::PhoneNumberFormat format =
61 PhoneNumberUtil::NATIONAL :
62 PhoneNumberUtil::INTERNATIONAL;
64 PhoneNumberUtil* phone_util = PhoneNumberUtil::GetInstance();
111 PhoneNumberUtil* phone_util = PhoneNumberUtil
[all...]
/external/chromium_org/third_party/libphonenumber/src/phonenumbers/geocoding/
H A Darea_code_map.h34 class PhoneNumberUtil;
66 const PhoneNumberUtil& phone_util_;
H A Dphonenumber_offline_geocoder.h37 class PhoneNumberUtil;
144 const PhoneNumberUtil* phone_util_;
H A Darea_code_map.cc30 : phone_util_(*PhoneNumberUtil::GetInstance()) {
H A Dphonenumber_offline_geocoder.cc70 phone_util_ = PhoneNumberUtil::GetInstance();
132 PhoneNumberUtil::kRegionCodeForNonGeoEntity) == 0) {
/external/chromium_org/third_party/libphonenumber/src/phonenumbers/
H A Dshortnumberinfo.h35 class PhoneNumberUtil;
59 const PhoneNumberUtil& phone_util_;
H A Dphonenumberutil.cc61 const char PhoneNumberUtil::kPlusChars[] = "+\xEF\xBC\x8B"; /* "++" */
68 const char PhoneNumberUtil::kValidPunctuation[] =
75 const char PhoneNumberUtil::kCaptureUpToSecondNumberStart[] = "(.*)[\\\\/] *x";
78 const char PhoneNumberUtil::kRegionCodeForNonGeoEntity[] = "001";
124 PhoneNumberUtil::PhoneNumberType type) {
126 case PhoneNumberUtil::PREMIUM_RATE:
128 case PhoneNumberUtil::TOLL_FREE:
130 case PhoneNumberUtil::MOBILE:
132 case PhoneNumberUtil::FIXED_LINE:
133 case PhoneNumberUtil
663 PhoneNumberUtil::PhoneNumberUtil() function in class:i18n::phonenumbers::PhoneNumberUtil
[all...]
H A Dphonenumbermatcher.h47 class PhoneNumberUtil;
77 PhoneNumberMatcher(const PhoneNumberUtil& util,
126 // Parses a phone number from the candidate using PhoneNumberUtil::Parse() and
135 ResultCallback4<bool, const PhoneNumberUtil&, const PhoneNumber&,
144 const PhoneNumberUtil& util,
156 const PhoneNumberUtil& util);
171 const PhoneNumberUtil& phone_util_;
H A Dasyoutypeformatter.h18 // method of the PhoneNumberUtil. After that digits can be added by invoking the
52 class PhoneNumberUtil;
85 // PhoneNumberUtil::GetAsYouTypeFormatter().
199 const PhoneNumberUtil& phone_util_;
230 friend class PhoneNumberUtil;
H A Dphonenumbermatcher.cc81 const PhoneNumberUtil& util) {
101 != PhoneNumberUtil::NSN_MATCH) {
118 const PhoneNumberUtil& util,
273 digit_block_limit_(PhoneNumberUtil::kMaxLengthForNsn +
274 PhoneNumberUtil::kMaxLengthCountryCode),
276 punctuation_(StrCat("[", PhoneNumberUtil::kValidPunctuation, "]",
279 lead_class_chars_(StrCat(opening_parens_, PhoneNumberUtil::kPlusChars)),
284 PhoneNumberUtil::GetInstance()->GetExtnPatternsForMatching(),
307 PhoneNumberUtil::kCaptureUpToSecondNumberStart)),
357 PhoneNumberMatcher::PhoneNumberMatcher(const PhoneNumberUtil
657 CheckNumberGroupingIsValid( const PhoneNumber& phone_number, const string& candidate, ResultCallback4<bool, const PhoneNumberUtil&, const PhoneNumber&, const string&, const vector<string>&>* checker) const argument
[all...]
H A Dphonenumberutil.h62 class PhoneNumberUtil : public Singleton<PhoneNumberUtil> { class in namespace:i18n::phonenumbers
72 friend class Singleton<PhoneNumberUtil>;
75 ~PhoneNumberUtil();
165 // Gets a PhoneNumberUtil instance to carry out international phone number
170 // The PhoneNumberUtil is implemented as a singleton. Therefore, calling
172 static PhoneNumberUtil* GetInstance();
207 // const PhoneNumberUtil& phone_util(*PhoneNumberUtil::GetInstance());
250 // const PhoneNumberUtil
[all...]
H A Dshortnumberinfo.cc48 : phone_util_(*PhoneNumberUtil::GetInstance()),
H A Dasyoutypeformatter.cc138 phone_util_(*PhoneNumberUtil::GetInstance()),
693 if (PhoneNumberUtil::kRegionCodeForNonGeoEntity == new_region_code) {
/external/chromium_org/content/renderer/android/
H A Dphone_number_detector.cc20 using i18n::phonenumbers::PhoneNumberUtil;
71 PhoneNumberUtil* phone_util = PhoneNumberUtil::GetInstance();
/external/libphonenumber/java/src/com/android/i18n/phonenumbers/
H A DPhoneNumberMatcher.java19 import com.android.i18n.phonenumbers.PhoneNumberUtil.Leniency;
20 import com.android.i18n.phonenumbers.PhoneNumberUtil.MatchType;
21 import com.android.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
35 * Instances can be created using the {@linkplain PhoneNumberUtil#findNumbers factory methods} in
36 * {@link PhoneNumberUtil}.
46 * {@code PhoneNumberUtil.VALID_PHONE_NUMBER}, but with the following differences:
154 PhoneNumberUtil.MAX_LENGTH_FOR_NSN + PhoneNumberUtil.MAX_LENGTH_COUNTRY_CODE;
160 String punctuation = "[" + PhoneNumberUtil.VALID_PUNCTUATION + "]" + punctuationLimit;
164 String leadClassChars = openingParens + PhoneNumberUtil
[all...]
H A DShortNumberInfo.java34 * {@link PhoneNumberUtil}.
43 new ShortNumberInfo(PhoneNumberUtil.getInstance());
68 private final PhoneNumberUtil phoneUtil;
71 ShortNumberInfo(PhoneNumberUtil util) {
382 number = PhoneNumberUtil.extractPossibleNumber(number);
383 if (PhoneNumberUtil.PLUS_CHARS_PATTERN.matcher(number).lookingAt()) {
395 String normalizedNumber = PhoneNumberUtil.normalizeDigitsOnly(number);
H A DAsYouTypeFormatter.java32 * {@link PhoneNumberUtil#getAsYouTypeFormatter}. After that, digits can be added by invoking
58 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
85 Pattern.compile("[" + PhoneNumberUtil.VALID_PUNCTUATION + "]*" +
86 "(\\$\\d" + "[" + PhoneNumberUtil.VALID_PUNCTUATION + "]*)+");
123 * PhoneNumberUtil#getAsYouTypeFormatter}.
184 PhoneNumberUtil.formattingRuleHasFirstGroupOnly(
419 PhoneNumberUtil.PLUS_CHARS_PATTERN.matcher(Character.toString(nextChar)).matches());
566 regexCache.getPatternForRegex("\\" + PhoneNumberUtil.PLUS_SIGN + "|" +
577 if (accruedInputWithoutFormatting.charAt(0) != PhoneNumberUtil
[all...]
H A DPhoneNumberUtil.java58 public class PhoneNumberUtil { class
62 return PhoneNumberUtil.class.getResourceAsStream(metadataFileName);
66 private static final Logger logger = Logger.getLogger(PhoneNumberUtil.class.getName());
359 private static PhoneNumberUtil instance = null;
437 * Leniency when {@linkplain PhoneNumberUtil#findNumbers finding} potential phone numbers in text
442 * Phone numbers accepted are {@linkplain PhoneNumberUtil#isPossibleNumber(PhoneNumber)
443 * possible}, but not necessarily {@linkplain PhoneNumberUtil#isValidNumber(PhoneNumber) valid}.
447 boolean verify(PhoneNumber number, String candidate, PhoneNumberUtil util) {
452 * Phone numbers accepted are {@linkplain PhoneNumberUtil#isPossibleNumber(PhoneNumber)
453 * possible} and {@linkplain PhoneNumberUtil#isValidNumbe
583 PhoneNumberUtil(String filePrefix, MetadataLoader metadataLoader, method in class:PhoneNumberUtil
[all...]
/external/libphonenumber/java/src/com/android/i18n/phonenumbers/geocoding/
H A DPhoneNumberOfflineGeocoder.java20 import com.android.i18n.phonenumbers.PhoneNumberUtil;
21 import com.android.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
38 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
75 regionCode.equals(PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY))
99 String mobileToken = PhoneNumberUtil.getCountryMobileToken(number.getCountryCode());
202 * A similar method is implemented as PhoneNumberUtil.isNumberGeographical, which performs a
/external/libphonenumber/java/src/com/android/i18n/phonenumbers/prefixmapper/
H A DPrefixTimeZonesMap.java19 import com.android.i18n.phonenumbers.PhoneNumberUtil;
92 PhoneNumberUtil.getInstance().getNationalSignificantNumber(number));
H A DPhonePrefixMap.java19 import com.android.i18n.phonenumbers.PhoneNumberUtil;
39 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();

Completed in 257 milliseconds