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

Commit 5497bd4d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Skip notifying network locked registrants if UiccApp==null" am: 290f6910 am: 73bdda79

Change-Id: Iec0ee12cacac0497b26de37a60f65aa39d0c5b3a
parents ea21124d 73bdda79
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -197,8 +197,13 @@ public class UiccProfile extends IccCard {
            logWithLocalLog("handleMessage: Received " + eventName + " for phoneId " + mPhoneId);
            switch (msg.what) {
                case EVENT_NETWORK_LOCKED:
                    if (mUiccApplication != null) {
                        mNetworkLockedRegistrants.notifyRegistrants(new AsyncResult(
                                null, mUiccApplication.getPersoSubState().ordinal(), null));
                    } else {
                        log("EVENT_NETWORK_LOCKED: mUiccApplication is NULL, "
                                + "mNetworkLockedRegistrants not notified.");
                    }
                    // intentional fall through
                case EVENT_RADIO_OFF_OR_UNAVAILABLE:
                case EVENT_ICC_LOCKED:
@@ -771,8 +776,15 @@ public class UiccProfile extends IccCard {
            mNetworkLockedRegistrants.add(r);

            if (getState() == IccCardConstants.State.NETWORK_LOCKED) {
                if (mUiccApplication != null) {
                    r.notifyRegistrant(
                        new AsyncResult(null, mUiccApplication.getPersoSubState().ordinal(), null));
                            new AsyncResult(null, mUiccApplication.getPersoSubState().ordinal(),
                                    null));

                } else {
                    log("registerForNetworkLocked: not notifying registrants, "
                            + "mUiccApplication == null");
                }
            }
        }
    }