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

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

Merge "Fix for properly setting SIM lock state." am: 871bb05c

am: 11a93183

Change-Id: I9befe3028d5008ae37754cce49acd3295c6b55c1
parents f7a57426 11a93183
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() {