Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1e586cf authored by Jonathan Basseri's avatar Jonathan Basseri Committed by Android (Google) Code Review
Browse files

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

parents 079f8e80 8a1ecd71
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -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 */
+0 −7
Original line number Diff line number Diff line
@@ -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.
     */