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

Commit 0cdccedb authored by Malcolm Chen's avatar Malcolm Chen
Browse files

Fix bug that UiccSlot#isStateUnknown returns true in ABSENT state.

For some cases, Uicc#mStateIsUnknown fails to be set to false. Here
it's fixed. Also, isStateUnknown will only return true if state is
null or ABSENT.

Test: manual
Bug: 79724575
Change-Id: I880a05dd9558716c9a3e78dc285fcf88662b0d25
Merged-In: I880a05dd9558716c9a3e78dc285fcf88662b0d25
parent f0866cbb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -179,8 +179,8 @@ public class UiccSlot extends Handler {
        // no card present in the slot now; dispose card and make mUiccCard null
        if (mUiccCard != null) {
            mUiccCard.dispose();
            nullifyUiccCard(false /* sim state is not unknown */);
        }
        nullifyUiccCard(false /* sim state is not unknown */);
        mLastRadioState = radioState;
    }

@@ -193,7 +193,7 @@ public class UiccSlot extends Handler {
    }

    public boolean isStateUnknown() {
        return mStateIsUnknown;
        return (mCardState == null || mCardState == CardState.CARDSTATE_ABSENT) && mStateIsUnknown;
    }

    private void checkIsEuiccSupported() {