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

Commit 8cf47e72 authored by Pengquan Meng's avatar Pengquan Meng Committed by Android (Google) Code Review
Browse files

Merge "Fixed subscriptionInfoUpdater crash" into qt-dev

parents 0b6f812a b21e912f
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -208,8 +208,15 @@ public class SubscriptionInfoUpdater extends Handler {
    @UnsupportedAppUsage
    private boolean isAllIccIdQueryDone() {
        for (int i = 0; i < PROJECT_SIM_NUM; i++) {
            UiccSlot slot = UiccController.getInstance().getUiccSlotForPhone(i);
            int slotId = UiccController.getInstance().getSlotIdFromPhoneId(i);
            if  (mIccId[i] == null || slot == null || !slot.isActive()) {
                if (mIccId[i] == null) {
                logd("Wait for SIM" + (i + 1) + " IccId");
                    logd("Wait for SIM " + i + " Iccid");
                } else {
                    logd(String.format("Wait for slot corresponding to phone %d to be active, "
                            + "slotId is %d", i, slotId));
                }
                return false;
            }
        }
@@ -617,7 +624,7 @@ public class SubscriptionInfoUpdater extends Handler {
            UiccSlot[] uiccSlots = uiccController.getUiccSlots();
            if (uiccSlots != null) {
                Arrays.stream(uiccSlots)
                        .filter(uiccSlot -> uiccSlot.getUiccCard() != null)
                        .filter(uiccSlot -> uiccSlot != null && uiccSlot.getUiccCard() != null)
                        .map(uiccSlot -> uiccController.convertToPublicCardId(
                                uiccSlot.getUiccCard().getCardId()))
                        .forEach(cardId -> updateEmbeddedSubscriptions(cardId));
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ public class EuiccCardController extends IEuiccCardController.Stub {
        }
        for (int i = 0; i < slots.length; ++i) {
            UiccSlot slotInfo = slots[i];
            if (!slotInfo.isRemovable() && slotInfo.isActive()) {
            if (slotInfo != null && !slotInfo.isRemovable() && slotInfo.isActive()) {
                return true;
            }
        }