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

Commit c18d3847 authored by Chen Xu's avatar Chen Xu
Browse files

fix ATR null pointer exception

ATR could be null when sim is absent or in a temp state after sim
slot mapping.

Bug: 219970500
Test: Manual & Build
Change-Id: I4514b982036bed5259978b54d2109503ea1f4c53
parent d8ffa576
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1144,7 +1144,7 @@ public class EuiccController extends IEuiccController.Stub {
    /**
     * Returns true if the target port index is valid.
     * 1. Port index is valid if it is non-negative and less than the total port count.
     * 2. In SS Mode, port index is invalid if the embedded slot already has an active empty port
     * 2. In SS Mode, port index is invalid if the embedded slot already has an active port
     * with different port index than the target port index.
     * 3. In DSDS mode, port index is invalid if the pSim slot is active and the embedded slot
     * already has an active empty port with different port index than the target port index.
+2 −1
Original line number Diff line number Diff line
@@ -291,7 +291,8 @@ public class UiccSlot extends Handler {
        // even ATR suggest UICC supports multiple enabled profiles, MEP can be disabled per
        // carrier restrictions, so checking the real number of ports reported from modem is
        // necessary.
        return mPortIdxToPhoneId.size() > 1 && mAtr.isMultipleEnabledProfilesSupported();
        return mPortIdxToPhoneId.size() > 1 && mAtr != null &&
                mAtr.isMultipleEnabledProfilesSupported();
    }

    private boolean absentStateUpdateNeeded(CardState oldState) {