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

Commit 7d447fa0 authored by Amit Mahajan's avatar Amit Mahajan Committed by Gerrit Code Review
Browse files

Merge "isStateUnknown() shall return true if the SIM state is still unknown"

parents 0f3c1d55 f6bb0ec2
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -201,7 +201,14 @@ public class UiccSlot extends Handler {
    }

    public boolean isStateUnknown() {
        return (mCardState == null || mCardState == CardState.CARDSTATE_ABSENT) && mStateIsUnknown;
        if (mCardState == null || mCardState == CardState.CARDSTATE_ABSENT) {
            // mStateIsUnknown is valid only in this scenario.
            return mStateIsUnknown;
        }
        // if mUiccCard is null, assume the state to be UNKNOWN for now.
        // The state may be known but since the actual card object is not available,
        // it is safer to return UNKNOWN.
        return mUiccCard == null;
    }

    private void checkIsEuiccSupported() {