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

Commit ee15000f authored by chen xu's avatar chen xu
Browse files

always update carrier id to simInfo by pass update check

during esim profile switch, there is no sim absent thus carrier id will persist and
might not trigger an update if switch profiles for the same carrier. thus always update
subscriptioninfo db to make sure we have correct carrier id set.

Bug: 129405714
Test: Manual
Change-Id: Ibc6928f11038a6c38816c3008eae3c5c078367cc
parent 0936e646
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -439,12 +439,15 @@ public class CarrierResolver extends Handler {
            cv.put(CarrierId.CARRIER_NAME, mCarrierName);
            mContext.getContentResolver().update(
                    Telephony.CarrierId.getUriForSubscriptionId(mPhone.getSubId()), cv, null, null);
        }
        // during esim profile switch, there is no sim absent thus carrier id will persist and
        // might not trigger an update if switch profiles for the same carrier. thus always update
        // subscriptioninfo db to make sure we have correct carrier id set.
        if (SubscriptionManager.isValidSubscriptionId(mPhone.getSubId())) {
            // only persist carrier id to simInfo db when subId is valid.
            SubscriptionController.getInstance().setCarrierId(mCarrierId, mPhone.getSubId());
        }
    }
    }

    private static CarrierMatchingRule makeCarrierMatchingRule(Cursor cursor) {
        String certs = cursor.getString(