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

Commit 3cf47555 authored by Hui Wang's avatar Hui Wang
Browse files

Check if the slot info is null to avoid exception

Bug: 198298029
Test: manual
Change-Id: Id5ad70e24ee2ddbb0e4910257e298c33709044a0
parent d6af8c55
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3483,7 +3483,8 @@ public class TelephonyManager {
     */
    private int getLogicalSlotIndex(int physicalSlotIndex) {
        UiccSlotInfo[] slotInfos = getUiccSlotsInfo();
        if (slotInfos != null && physicalSlotIndex >= 0 && physicalSlotIndex < slotInfos.length) {
        if (slotInfos != null && physicalSlotIndex >= 0 && physicalSlotIndex < slotInfos.length
                && slotInfos[physicalSlotIndex] != null) {
            return slotInfos[physicalSlotIndex].getLogicalSlotIdx();
        }