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

Commit 8a5df200 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixed esim fresh issue"

parents 7ec0006a 8df58c74
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -59,8 +59,8 @@ import com.android.internal.telephony.uicc.UiccSlot;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 *@hide
@@ -702,13 +702,13 @@ public class SubscriptionInfoUpdater extends Handler {
                mSubscriptionManager.getDefaultDataSubscriptionId());

        // No need to check return value here as we notify for the above changes anyway.
        if (subInfos != null) {
        UiccController uiccController = UiccController.getInstance();
            subInfos.stream()
                    .filter(subInfo -> subInfo.isEmbedded())
                    .mapToInt(subInfo -> subInfo.getCardId())
                    .mapToObj(cardId -> cardId)
                    .collect(Collectors.toSet())
        UiccSlot[] uiccSlots = uiccController.getUiccSlots();
        if (uiccSlots != null) {
            Arrays.stream(uiccSlots)
                .filter(uiccSlot -> uiccSlot.isEuicc())
                .map(uiccSlot -> uiccController.convertToPublicCardId(
                            uiccSlot.getUiccCard().getCardId()))
                .forEach(cardId -> updateEmbeddedSubscriptions(cardId));
        }