diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 1544218a71c00f3d44474469655e9435f9787d45..2e7b19a2d1c84e822d8c8e1e74b9474ce8c18304 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1654,7 +1654,8 @@ public class TelephonyManager { * @hide */ public String getNetworkCountryIso(int subId) { - return getNetworkCountryIsoForPhone(getPhoneId(subId)); + int phoneId = SubscriptionManager.getPhoneId(subId); + return getNetworkCountryIsoForPhone(phoneId); } /** @@ -1669,14 +1670,7 @@ public class TelephonyManager { */ /** {@hide} */ public String getNetworkCountryIsoForPhone(int phoneId) { - try { - ITelephony telephony = getITelephony(); - if (telephony != null) - return ""; - return telephony.getNetworkCountryIsoForPhone(phoneId); - } catch (RemoteException ex) { - return ""; - } + return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, ""); } /** Network type is unknown */ diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 654adb280310e53792915b895672b812e8d9f028..a0e5b7b0a1d6b8fcc3df8194f01a14935bc50ba4 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -376,13 +376,6 @@ interface ITelephony { Bundle getCellLocation(String callingPkg); - /** - * Returns the ISO country code equivalent of the current registered - * operator's MCC (Mobile Country Code). - * @see android.telephony.TelephonyManager#getNetworkCountryIso - */ - String getNetworkCountryIsoForPhone(int phoneId); - /** * Returns the neighboring cell information of the device. */