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

Commit d89ca01a authored by Preeti Ahuja's avatar Preeti Ahuja
Browse files

Populate the subId for the slotId before calling the subIdUpdated callback

The callback onSubIdUpdated() is called before assigning the new value to
mSubIdForSlot[]. If a callback registers for onSubIdUpdated and calls
getPhoneIdBySubId(), an old faulty value will be returned.

Populate the subIdForSlotId before calling the onSubIdUpdated() callback.

Change-Id: I72cd43723b0c84e76aaaea2ee49ff2216827b359
CRs-Fixed: 782027
parent 2742da75
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -678,6 +678,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                //Got intent with correct subId for the slot now.
                if (mSubIdForSlot[subInfo.slotId] != subInfo.subId) {
                    long subId = mSubIdForSlot[subInfo.slotId];
                    mSubIdForSlot[subInfo.slotId] = subInfo.subId;
                    mPlmn.put(subInfo.subId, mPlmn.get(subId));
                    mSpn.put(subInfo.subId, mSpn.get(subId));

@@ -689,7 +690,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                        }
                    }
                }
                mSubIdForSlot[subInfo.slotId] = subInfo.subId;
                if (DEBUG) {
                    Log.d(TAG, "handleSubInfoRecordUpdate mSubIdForSlot["
                        + subInfo.slotId + "] = " + subInfo.subId);