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

Commit f6bb0ec2 authored by Yoshiaki Naka's avatar Yoshiaki Naka
Browse files

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

It is possible that the new card state 'PRESENT' is notified but new ICC
state is not notified yet. 'UNKNOWN' is the appropriate state in that
scenario.

Bug: 122091742
Test: Manual test

Change-Id: I6d812bb41023270cb6e78b028e426f82b62208a0
parent db6a3000
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() {