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

Commit 7fea5bea authored by Preeti Ahuja's avatar Preeti Ahuja Committed by Steve Kondik
Browse files

Broadcast icc card state as NOT_READY if card is not initialized

When radio turns on, card state (external state ) is updated.
At this point, if the UiccCard instance is null (UiccCard instance could
be null at bootup, before we have received a vaild card state from
UiccController), icc state as ABSENT is broadcasted.

When the card state is being updated, if the UiccCard instance
is null, broadcast the state as NOT_READY instead of ABSENT.

Change-Id: I86fe1db536e25b8c46e46a0dd009b21869737019
CRs-Fixed: 773273
parent bf5f25a2
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -453,7 +453,6 @@ public class IccCardProxy extends Handler implements IccCard {
                registerUiccCardEvents();
                registerUiccCardEvents();
                updateActiveRecord();
                updateActiveRecord();
            }
            }

            updateExternalState();
            updateExternalState();
        }
        }
    }
    }
@@ -468,7 +467,15 @@ public class IccCardProxy extends Handler implements IccCard {
    }
    }


    private void updateExternalState() {
    private void updateExternalState() {
        if (mUiccCard == null || mUiccCard.getCardState() == CardState.CARDSTATE_ABSENT) {

        // mUiccCard could be null at bootup, before valid card states have
        // been received from UiccController.
        if (mUiccCard == null) {
            setExternalState(State.NOT_READY);
            return;
        }

        if (mUiccCard.getCardState() == CardState.CARDSTATE_ABSENT) {
            if (mRadioOn) {
            if (mRadioOn) {
                setExternalState(State.ABSENT);
                setExternalState(State.ABSENT);
            } else {
            } else {