Merge "Revert "Move getNetworkCountryIso impl from TM to PIM.""

This commit is contained in:
Jonathan Basseri
2017-08-02 01:44:09 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 16 deletions

View File

@@ -1613,7 +1613,8 @@ public class TelephonyManager {
* @hide * @hide
*/ */
public String getNetworkCountryIso(int subId) { public String getNetworkCountryIso(int subId) {
return getNetworkCountryIsoForPhone(getPhoneId(subId)); int phoneId = SubscriptionManager.getPhoneId(subId);
return getNetworkCountryIsoForPhone(phoneId);
} }
/** /**
@@ -1628,14 +1629,7 @@ public class TelephonyManager {
*/ */
/** {@hide} */ /** {@hide} */
public String getNetworkCountryIsoForPhone(int phoneId) { public String getNetworkCountryIsoForPhone(int phoneId) {
try { return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, "");
ITelephony telephony = getITelephony();
if (telephony != null)
return "";
return telephony.getNetworkCountryIsoForPhone(phoneId);
} catch (RemoteException ex) {
return "";
}
} }
/** Network type is unknown */ /** Network type is unknown */

View File

@@ -376,13 +376,6 @@ 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.
*/ */