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

Commit e1ca0743 authored by Meng Wang's avatar Meng Wang Committed by Gerrit Code Review
Browse files

Merge "Remove hidden API usage: TelephonyManager#getSimOperator(int subId)"

parents 203d9d6d 3eb1e653
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -231,7 +231,8 @@ public class EmergencyAffordanceService extends SystemService {
                // a Sim with a different mcc code was found
                // a Sim with a different mcc code was found
                neededNow = false;
                neededNow = false;
            }
            }
            String simOperator  = mTelephonyManager.getSimOperator(info.getSubscriptionId());
            String simOperator = mTelephonyManager
                    .createForSubscriptionId(info.getSubscriptionId()).getSimOperator();
            mcc = 0;
            mcc = 0;
            if (simOperator != null && simOperator.length() >= 3) {
            if (simOperator != null && simOperator.length() >= 3) {
                mcc = Integer.parseInt(simOperator.substring(0, 3));
                mcc = Integer.parseInt(simOperator.substring(0, 3));