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

Commit 0f951e1b authored by Bonian Chen's avatar Bonian Chen Committed by Automerger Merge Worker
Browse files

Merge "Mainline: removed legacy UI for network selection mode." am: 6afb84d6

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1387134

Change-Id: I8161ffae6bbe96c93dafa3328cb2fdad6614b4d9
parents 05b07f42 6afb84d6
Loading
Loading
Loading
Loading
+1 −18
Original line number Original line Diff line number Diff line
@@ -115,26 +115,9 @@ public class SubscriptionUtil {
            return null;
            return null;
        }
        }


        if (subInfo.isEmbedded()) {
        return subInfo;
        return subInfo;
    }
    }


        // Look for physical SIM which presented in slots no mater active or not.
        final UiccSlotInfo[] slotsInfo = getUiccSlotsInfo(context);
        if (slotsInfo == null) {
            return null;
        }
        for (UiccSlotInfo slotInfo : slotsInfo) {
            if ((!slotInfo.getIsEuicc())
                    && (slotInfo.getCardStateInfo() == CARD_STATE_INFO_PRESENT)
                    && (slotInfo.getLogicalSlotIdx() == subInfo.getSimSlotIndex())
                    && TextUtils.equals(slotInfo.getCardId(), subInfo.getCardString())) {
                return subInfo;
            }
        }
        return null;
    }

    private static UiccSlotInfo [] getUiccSlotsInfo(Context context) {
    private static UiccSlotInfo [] getUiccSlotsInfo(Context context) {
        final TelephonyManager telMgr = context.getSystemService(TelephonyManager.class);
        final TelephonyManager telMgr = context.getSystemService(TelephonyManager.class);
        return telMgr.getUiccSlotsInfo();
        return telMgr.getUiccSlotsInfo();