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

Commit c4729a41 authored by Jack Yu's avatar Jack Yu
Browse files

Added slot index version of getNetworkCountryIso

Added this API to get network country ISO so in SIM
absent case, we can get the information from the 2nd
phone.

Bug: 141128426
Test: CTS
Change-Id: I49a55a5b549c15c55ffe1cd830a3c580eec3cff9
parent 759815c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -414,7 +414,7 @@ public class GsmCdmaCallTracker extends CallTracker {
        TelephonyManager tm =
                (TelephonyManager) mPhone.getContext().getSystemService(Context.TELEPHONY_SERVICE);
        String origNumber = dialString;
        String operatorIsoContry = tm.getNetworkCountryIsoForPhone(mPhone.getPhoneId());
        String operatorIsoContry = tm.getNetworkCountryIso(mPhone.getPhoneId());
        String simIsoContry = tm.getSimCountryIsoForPhone(mPhone.getPhoneId());
        boolean internationalRoaming = !TextUtils.isEmpty(operatorIsoContry)
                && !TextUtils.isEmpty(simIsoContry)
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ public interface NitzStateMachine {
        }

        public String getNetworkCountryIsoForPhone() {
            return mTelephonyManager.getNetworkCountryIsoForPhone(mPhone.getPhoneId());
            return mTelephonyManager.getNetworkCountryIso(mPhone.getPhoneId());
        }
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -1242,7 +1242,7 @@ public abstract class SMSDispatcher extends Handler {
                if (simCountryIso == null || simCountryIso.length() != 2) {
                    Rlog.e(TAG, "Can't get SIM country Iso: trying network country Iso");
                    simCountryIso =
                            mTelephonyManager.getNetworkCountryIsoForPhone(mPhone.getPhoneId());
                            mTelephonyManager.getNetworkCountryIso(mPhone.getPhoneId());
                }

                smsCategory =
@@ -1252,7 +1252,7 @@ public abstract class SMSDispatcher extends Handler {
            }
            if (rule == PREMIUM_RULE_USE_NETWORK || rule == PREMIUM_RULE_USE_BOTH) {
                String networkCountryIso =
                        mTelephonyManager.getNetworkCountryIsoForPhone(mPhone.getPhoneId());
                        mTelephonyManager.getNetworkCountryIso(mPhone.getPhoneId());
                if (networkCountryIso == null || networkCountryIso.length() != 2) {
                    Rlog.e(TAG, "Can't get Network country Iso: trying SIM country Iso");
                    networkCountryIso =