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

Commit 871bb05c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix for properly setting SIM lock state."

parents 7d1f1e5a e200adbf
Loading
Loading
Loading
Loading
+19 −15
Original line number Diff line number Diff line
@@ -232,7 +232,13 @@ public class UiccProfile extends Handler implements IccCard {

            case EVENT_APP_READY:
                if (VDBG) log("EVENT_APP_READY");
                setExternalStateOnReady();
                if (areAllApplicationsReady()) {
                    if (areAllRecordsLoaded() && areCarrierPriviligeRulesLoaded()) {
                        setExternalState(IccCardConstants.State.LOADED);
                    } else {
                        setExternalState(IccCardConstants.State.READY);
                    }
                }
                break;

            case EVENT_RECORDS_LOADED:
@@ -282,7 +288,9 @@ public class UiccProfile extends Handler implements IccCard {
            case EVENT_CARRIER_PRIVILEGES_LOADED:
                if (VDBG) log("EVENT_CARRIER_PRIVILEGES_LOADED");
                onCarrierPriviligesLoadedMessage();
                if (areAllRecordsLoaded()) {
                    setExternalState(IccCardConstants.State.LOADED);
                }
                break;

            case EVENT_OPEN_LOGICAL_CHANNEL_DONE:
@@ -379,12 +387,6 @@ public class UiccProfile extends Handler implements IccCard {
                // Otherwise don't change external SIM state.
                break;
            case APPSTATE_READY:
                setExternalStateOnReady();
                break;
        }
    }

    private void setExternalStateOnReady() {
                if (areAllApplicationsReady()) {
                    if (areAllRecordsLoaded() && areCarrierPriviligeRulesLoaded()) {
                        setExternalState(IccCardConstants.State.LOADED);
@@ -394,6 +396,8 @@ public class UiccProfile extends Handler implements IccCard {
                } else {
                    setExternalState(IccCardConstants.State.NOT_READY);
                }
                break;
        }
    }

    private void registerAllAppEvents() {