Lines Matching refs:phoneNumber
243 extractNetworkPortion(String phoneNumber) { in extractNetworkPortion() argument
244 if (phoneNumber == null) { in extractNetworkPortion()
248 int len = phoneNumber.length(); in extractNetworkPortion()
252 char c = phoneNumber.charAt(i); in extractNetworkPortion()
282 public static String extractNetworkPortionAlt(String phoneNumber) { in extractNetworkPortionAlt() argument
283 if (phoneNumber == null) { in extractNetworkPortionAlt()
287 int len = phoneNumber.length(); in extractNetworkPortionAlt()
292 char c = phoneNumber.charAt(i); in extractNetworkPortionAlt()
314 public static String stripSeparators(String phoneNumber) { in stripSeparators() argument
315 if (phoneNumber == null) { in stripSeparators()
318 int len = phoneNumber.length(); in stripSeparators()
322 char c = phoneNumber.charAt(i); in stripSeparators()
345 public static String convertAndStrip(String phoneNumber) { in convertAndStrip() argument
346 return stripSeparators(convertKeypadLettersToDigits(phoneNumber)); in convertAndStrip()
355 public static String convertPreDial(String phoneNumber) { in convertPreDial() argument
356 if (phoneNumber == null) { in convertPreDial()
359 int len = phoneNumber.length(); in convertPreDial()
363 char c = phoneNumber.charAt(i); in convertPreDial()
424 extractPostDialPortion(String phoneNumber) { in extractPostDialPortion() argument
425 if (phoneNumber == null) return null; in extractPostDialPortion()
430 trimIndex = indexOfLastNetworkChar (phoneNumber); in extractPostDialPortion()
432 for (int i = trimIndex + 1, s = phoneNumber.length() in extractPostDialPortion()
435 char c = phoneNumber.charAt(i); in extractPostDialPortion()
743 toCallerIDMinMatch(String phoneNumber) { in toCallerIDMinMatch() argument
744 String np = extractNetworkPortionAlt(phoneNumber); in toCallerIDMinMatch()
756 getStrippedReversed(String phoneNumber) { in getStrippedReversed() argument
757 String np = extractNetworkPortionAlt(phoneNumber); in getStrippedReversed()
1072 public static boolean isGlobalPhoneNumber(String phoneNumber) { in isGlobalPhoneNumber() argument
1073 if (TextUtils.isEmpty(phoneNumber)) { in isGlobalPhoneNumber()
1077 Matcher match = GLOBAL_PHONE_NUMBER_PATTERN.matcher(phoneNumber); in isGlobalPhoneNumber()
1488 public static String formatNumberToE164(String phoneNumber, String defaultCountryIso) { in formatNumberToE164() argument
1489 return formatNumberInternal(phoneNumber, defaultCountryIso, PhoneNumberFormat.E164); in formatNumberToE164()
1499 public static String formatNumberToRFC3966(String phoneNumber, String defaultCountryIso) { in formatNumberToRFC3966() argument
1500 return formatNumberInternal(phoneNumber, defaultCountryIso, PhoneNumberFormat.RFC3966); in formatNumberToRFC3966()
1521 PhoneNumber phoneNumber = util.parse(rawPhoneNumber, defaultCountryIso); in formatNumberInternal() local
1522 if (util.isValidNumber(phoneNumber)) { in formatNumberInternal()
1523 return util.format(phoneNumber, formatIdentifier); in formatNumberInternal()
1539 public static boolean isInternationalNumber(String phoneNumber, String defaultCountryIso) { in isInternationalNumber() argument
1541 if (TextUtils.isEmpty(phoneNumber)) { in isInternationalNumber()
1546 if (phoneNumber.startsWith("#") || phoneNumber.startsWith("*")) { in isInternationalNumber()
1552 PhoneNumber pn = util.parseAndKeepRawInput(phoneNumber, defaultCountryIso); in isInternationalNumber()
1572 public static String formatNumber(String phoneNumber, String defaultCountryIso) { in formatNumber() argument
1574 if (phoneNumber.startsWith("#") || phoneNumber.startsWith("*")) { in formatNumber()
1575 return phoneNumber; in formatNumber()
1581 PhoneNumber pn = util.parseAndKeepRawInput(phoneNumber, defaultCountryIso); in formatNumber()
1629 String phoneNumber, String phoneNumberE164, String defaultCountryIso) { in formatNumber() argument
1630 int len = phoneNumber.length(); in formatNumber()
1632 if (!isDialable(phoneNumber.charAt(i))) { in formatNumber()
1633 return phoneNumber; in formatNumber()
1647 normalizeNumber(phoneNumber).indexOf(phoneNumberE164.substring(1)) <= 0) { in formatNumber()
1653 String result = formatNumber(phoneNumber, defaultCountryIso); in formatNumber()
1654 return result != null ? result : phoneNumber; in formatNumber()
1665 public static String normalizeNumber(String phoneNumber) { in normalizeNumber() argument
1666 if (TextUtils.isEmpty(phoneNumber)) { in normalizeNumber()
1671 int len = phoneNumber.length(); in normalizeNumber()
1673 char c = phoneNumber.charAt(i); in normalizeNumber()
1681 return normalizeNumber(PhoneNumberUtils.convertKeypadLettersToDigits(phoneNumber)); in normalizeNumber()
2537 public static CharSequence createTtsSpannable(CharSequence phoneNumber) { in createTtsSpannable() argument
2538 if (phoneNumber == null) { in createTtsSpannable()
2541 Spannable spannable = Spannable.Factory.getInstance().newSpannable(phoneNumber); in createTtsSpannable()
2572 public static CharSequence ttsSpanAsPhoneNumber(CharSequence phoneNumber) { in ttsSpanAsPhoneNumber() argument
2573 return createTtsSpannable(phoneNumber); in ttsSpanAsPhoneNumber()
2606 PhoneNumber phoneNumber = null; in createTtsSpan() local
2611 phoneNumber = phoneNumberUtil.parse(phoneNumberString, /* defaultRegion */ null); in createTtsSpan()
2617 if (phoneNumber == null) { in createTtsSpan()
2622 if (phoneNumber.hasCountryCode()) { in createTtsSpan()
2623 builder.setCountryCode(Integer.toString(phoneNumber.getCountryCode())); in createTtsSpan()
2625 builder.setNumberParts(Long.toString(phoneNumber.getNationalNumber())); in createTtsSpan()