Loading telephony/java/android/telephony/TelephonyManager.java +13 −10 Original line number Diff line number Diff line Loading @@ -2777,21 +2777,22 @@ public class TelephonyManager { } /** * Returns the ISO-3166 country code equivalent of the MCC (Mobile Country Code) of the current * registered operator or the cell nearby, if available. * Returns the ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) of * the current registered operator or the cell nearby, if available. * * Note: Result may be unreliable on CDMA networks (use {@link #getPhoneType()} to determine * if on a CDMA network). * <p> * @return the lowercase 2 character ISO-3166 country code, or empty string if not available. * @return the lowercase 2 character ISO-3166-1 alpha-2 country code, or empty string if not * available. */ public String getNetworkCountryIso() { return getNetworkCountryIso(getSlotIndex()); } /** * Returns the ISO-3166 country code equivalent of the MCC (Mobile Country Code) of the current * registered operator or the cell nearby, if available. This is same as * Returns the ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) of * the current registered operator or the cell nearby, if available. This is same as * {@link #getNetworkCountryIso()} but allowing specifying the SIM slot index. This is used for * accessing network country info from the SIM slot that does not have SIM inserted. * Loading @@ -2801,7 +2802,8 @@ public class TelephonyManager { * * @param slotIndex the SIM slot index to get network country ISO. * * @return the lowercase 2 character ISO-3166 country code, or empty string if not available. * @return the lowercase 2 character ISO-3166-1 alpha-2 country code, or empty string if not * available. * * @throws IllegalArgumentException when the slotIndex is invalid. * Loading Loading @@ -3756,10 +3758,11 @@ public class TelephonyManager { } /** * Returns the ISO-3166 country code equivalent for the SIM provider's country code. * Returns the ISO-3166-1 alpha-2 country code equivalent for the SIM provider's country code. * <p> * The ISO-3166 country code is provided in lowercase 2 character format. * @return the lowercase 2 character ISO-3166 country code, or empty string is not available. * The ISO-3166-1 alpha-2 country code is provided in lowercase 2 character format. * @return the lowercase 2 character ISO-3166-1 alpha-2 country code, or empty string is not * available. */ public String getSimCountryIso() { return getSimCountryIsoForPhone(getPhoneId()); Loading Loading @@ -12301,7 +12304,7 @@ public class TelephonyManager { /** * The extra used with an {@link #ACTION_NETWORK_COUNTRY_CHANGED} to specify the * the country code in ISO 3166 format. * the country code in ISO-3166-1 alpha-2 format. * <p class="note"> * Retrieve with {@link android.content.Intent#getStringExtra(String)}. */ Loading Loading
telephony/java/android/telephony/TelephonyManager.java +13 −10 Original line number Diff line number Diff line Loading @@ -2777,21 +2777,22 @@ public class TelephonyManager { } /** * Returns the ISO-3166 country code equivalent of the MCC (Mobile Country Code) of the current * registered operator or the cell nearby, if available. * Returns the ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) of * the current registered operator or the cell nearby, if available. * * Note: Result may be unreliable on CDMA networks (use {@link #getPhoneType()} to determine * if on a CDMA network). * <p> * @return the lowercase 2 character ISO-3166 country code, or empty string if not available. * @return the lowercase 2 character ISO-3166-1 alpha-2 country code, or empty string if not * available. */ public String getNetworkCountryIso() { return getNetworkCountryIso(getSlotIndex()); } /** * Returns the ISO-3166 country code equivalent of the MCC (Mobile Country Code) of the current * registered operator or the cell nearby, if available. This is same as * Returns the ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) of * the current registered operator or the cell nearby, if available. This is same as * {@link #getNetworkCountryIso()} but allowing specifying the SIM slot index. This is used for * accessing network country info from the SIM slot that does not have SIM inserted. * Loading @@ -2801,7 +2802,8 @@ public class TelephonyManager { * * @param slotIndex the SIM slot index to get network country ISO. * * @return the lowercase 2 character ISO-3166 country code, or empty string if not available. * @return the lowercase 2 character ISO-3166-1 alpha-2 country code, or empty string if not * available. * * @throws IllegalArgumentException when the slotIndex is invalid. * Loading Loading @@ -3756,10 +3758,11 @@ public class TelephonyManager { } /** * Returns the ISO-3166 country code equivalent for the SIM provider's country code. * Returns the ISO-3166-1 alpha-2 country code equivalent for the SIM provider's country code. * <p> * The ISO-3166 country code is provided in lowercase 2 character format. * @return the lowercase 2 character ISO-3166 country code, or empty string is not available. * The ISO-3166-1 alpha-2 country code is provided in lowercase 2 character format. * @return the lowercase 2 character ISO-3166-1 alpha-2 country code, or empty string is not * available. */ public String getSimCountryIso() { return getSimCountryIsoForPhone(getPhoneId()); Loading Loading @@ -12301,7 +12304,7 @@ public class TelephonyManager { /** * The extra used with an {@link #ACTION_NETWORK_COUNTRY_CHANGED} to specify the * the country code in ISO 3166 format. * the country code in ISO-3166-1 alpha-2 format. * <p class="note"> * Retrieve with {@link android.content.Intent#getStringExtra(String)}. */ Loading