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

Commit d6053bd7 authored by Jorge Ruesga's avatar Jorge Ruesga Committed by Gerrit Code Review
Browse files

keyguard: refresh carrier info on subId changes



Currently, the SPN_STRINGS_UPDATED_ACTION intent receives the phoneId and subId, but sometimes
during boot the SubscriptionManager isn't be updated yet, which lead to SPN and PLMN were mapped
with an invalid id in the KeyguardUpdateMonitor, and CarrierText not being updated, although
in the phone implementation the data is correct.
This change updates the carrier info also on SUBID changes, so in case the subid were
updated after SPN_STRINGS_UPDATED_ACTION, all SPN and PLMN can be mapped properly to the
correct SUBID and CarrierText update with the right values.

Change-Id: Ia4243ee8781a31942cb4370489df17f9c970e41f
Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>
parent 86e49068
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -676,6 +676,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                //subId for the slot initially initiazed to invalid value
                //Got intent with correct subId for the slot now.
                if (mSubIdForSlot[subInfo.slotId] != subInfo.subId) {
                    // Update carrier info before
                    handleCarrierInfoUpdate(subInfo.subId);

                    long subId = mSubIdForSlot[subInfo.slotId];
                    mSimState.put(subInfo.subId, mSimState.get(subId));
                    mPlmn.put(subInfo.subId, mPlmn.get(subId));
@@ -701,6 +704,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
    }

    protected void handleSubInfoContentChange(SubInfoContent content) {
        // Update carrier info before
        handleCarrierInfoUpdate(content.subInfoId);

        final int count = mCallbacks.size();
        for (int i = 0; i < count; i++) {
            KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();