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

Commit d2be5eb3 authored by Arun Voddu's avatar Arun Voddu Committed by Android (Google) Code Review
Browse files

Merge "Fixed ConcurrentModificationException in UiccSlot component." into main

parents fbec9ecc 5f91f203
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.util.Log;
import android.view.WindowManager;

import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.IccCardConstants;
import com.android.internal.telephony.Phone;
@@ -495,8 +496,10 @@ public class UiccSlot extends Handler {
     *  Use this API to get the iccId of the inactive port only.
     */
    public String getIccId(int portIdx) {
        synchronized (mLock) {
            return mIccIds.get(portIdx);
        }
    }

    public String getEid() {
        return mEid;
@@ -660,10 +663,13 @@ public class UiccSlot extends Handler {
    }

    private Map<Integer, String> getPrintableIccIds() {
        Map<Integer, String> printableIccIds = mIccIds.entrySet().stream()
        Map<Integer, String> copyOfIccIdMap;
        synchronized (mLock) {
            copyOfIccIdMap = new HashMap<>(mIccIds);
        }
        return copyOfIccIdMap.entrySet().stream()
                .collect(Collectors.toMap(Map.Entry::getKey,
                        e -> SubscriptionInfo.getPrintableId(e.getValue())));
        return printableIccIds;
    }

    /**