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

Commit 3c849d26 authored by Srikanth Chintala's avatar Srikanth Chintala
Browse files

Fix getSimOperator to return mccmnc based on subId

Return mcc-mnc from getSimOperator method based on subId if
telephonyManager is created specific to a subId

Bug: 64553892
Change-Id: I3fba230241242564a6a01507b4660124cfeba28a
parent f44ebf5f
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -2115,7 +2115,9 @@ public class TelephonyManager {
     * @hide
     */
    public String getSimOperatorNumeric() {
        int subId = SubscriptionManager.getDefaultDataSubscriptionId();
        int subId = mSubId;
        if (!SubscriptionManager.isUsableSubIdValue(subId)) {
            subId = SubscriptionManager.getDefaultDataSubscriptionId();
            if (!SubscriptionManager.isUsableSubIdValue(subId)) {
                subId = SubscriptionManager.getDefaultSmsSubscriptionId();
                if (!SubscriptionManager.isUsableSubIdValue(subId)) {
@@ -2125,6 +2127,7 @@ public class TelephonyManager {
                    }
                }
            }
        }
        return getSimOperatorNumeric(subId);
    }