Loading telephony/java/android/telephony/TelephonyManager.java +9 −3 Original line number Original line Diff line number Diff line Loading @@ -1628,8 +1628,7 @@ public class TelephonyManager { * @hide * @hide */ */ public String getNetworkCountryIso(int subId) { public String getNetworkCountryIso(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return getNetworkCountryIsoForPhone(getPhoneId(subId)); return getNetworkCountryIsoForPhone(phoneId); } } /** /** Loading @@ -1644,7 +1643,14 @@ public class TelephonyManager { */ */ /** {@hide} */ /** {@hide} */ public String getNetworkCountryIsoForPhone(int phoneId) { public String getNetworkCountryIsoForPhone(int phoneId) { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, ""); try { ITelephony telephony = getITelephony(); if (telephony != null) return ""; return telephony.getNetworkCountryIsoForPhone(phoneId); } catch (RemoteException ex) { return ""; } } } /** Network type is unknown */ /** Network type is unknown */ Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +7 −0 Original line number Original line Diff line number Diff line Loading @@ -376,6 +376,13 @@ interface ITelephony { Bundle getCellLocation(String callingPkg); 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. * Returns the neighboring cell information of the device. */ */ Loading Loading
telephony/java/android/telephony/TelephonyManager.java +9 −3 Original line number Original line Diff line number Diff line Loading @@ -1628,8 +1628,7 @@ public class TelephonyManager { * @hide * @hide */ */ public String getNetworkCountryIso(int subId) { public String getNetworkCountryIso(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return getNetworkCountryIsoForPhone(getPhoneId(subId)); return getNetworkCountryIsoForPhone(phoneId); } } /** /** Loading @@ -1644,7 +1643,14 @@ public class TelephonyManager { */ */ /** {@hide} */ /** {@hide} */ public String getNetworkCountryIsoForPhone(int phoneId) { public String getNetworkCountryIsoForPhone(int phoneId) { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, ""); try { ITelephony telephony = getITelephony(); if (telephony != null) return ""; return telephony.getNetworkCountryIsoForPhone(phoneId); } catch (RemoteException ex) { return ""; } } } /** Network type is unknown */ /** Network type is unknown */ Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +7 −0 Original line number Original line Diff line number Diff line Loading @@ -376,6 +376,13 @@ interface ITelephony { Bundle getCellLocation(String callingPkg); 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. * Returns the neighboring cell information of the device. */ */ Loading