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

Commit bca1f779 authored by Amit Mahajan's avatar Amit Mahajan Committed by android-build-merger
Browse files

Merge "Add sanity check to avoid NullPointerException." am: df844ef5

am: 5688d2e9

Change-Id: I4b1c58e4b59da86c8f539f6bfe549c94b3b07429
parents 54156928 5688d2e9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -384,7 +384,12 @@ public class SubscriptionInfoUpdater extends Handler {
        // removed or a refresh RESET that the IccRecords could be null. The right behavior is to
        // not broadcast the SIM loaded.
        int loadedSlotId = slotId;
        IccRecords records = mPhone[slotId].getIccCard().getIccRecords();
        IccCard iccCard = mPhone[slotId].getIccCard();
        if (iccCard == null) {  // Possibly a race condition.
            logd("handleSimLoaded: IccCard null");
            return;
        }
        IccRecords records = iccCard.getIccRecords();
        if (records == null) {  // Possibly a race condition.
            logd("handleSimLoaded: IccRecords null");
            return;