Android 怎麼去掉聯絡人、通話記錄、撥號列表介面中的電話號碼中間的空格?
阿新 • • 發佈:2019-01-29
FILE: PhoneNumberUtils.java
PATH: alps/frameworks/base/telephony/java/android/Telephony
---------------------------------------------------------------------------------------------------------------------------
/**
* Format a phone number.
* <p>
* If the given number doesn't have the country code, the phone will be
* formatted to the default country's convention.
*
* @param phoneNumber
* the number to be formatted.
* @param defaultCountryIso
* the ISO 3166-1 two letters country code whose convention will
* be used if the given number doesn't have the country code.
* @return the formatted number, or null if the given number is not valid.
*
* @hide
*/
public static String formatNumber (String phoneNumber, String defaultCountryIso) {
PATH: alps/frameworks/base/telephony/java/android/Telephony
---------------------------------------------------------------------------------------------------------------------------
/**
* Format a phone number.
* <p>
* If the given number doesn't have the country code, the phone will be
* formatted to the default country's convention.
*
* @param phoneNumber
* the number to be formatted.
* @param defaultCountryIso
* the ISO 3166-1 two letters country code whose convention will
* be used if the given number doesn't have the country code.
* @return the formatted number, or null if the given number is not valid.
*
* @hide
*/
public static String formatNumber