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

Commit 9d37dae0 authored by Shivakumar Neginal's avatar Shivakumar Neginal Committed by Android (Google) Code Review
Browse files

Merge "[eSIM] Get sim state for active port index instead of DEFAULT_PORT_INDEX 0." into tm-dev

parents 2dff7839 89d59314
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3584,7 +3584,8 @@ public class TelephonyManager {
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    @Deprecated
    public @SimState int getSimCardState(int physicalSlotIndex) {
        int simState = getSimState(getLogicalSlotIndex(physicalSlotIndex, DEFAULT_PORT_INDEX));
        int activePort = getFirstActivePortIndex(physicalSlotIndex);
        int simState = getSimState(getLogicalSlotIndex(physicalSlotIndex, activePort));
        return getSimCardStateFromSimState(simState);
    }
@@ -3690,9 +3691,10 @@ public class TelephonyManager {
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    @Deprecated
    public @SimState int getSimApplicationState(int physicalSlotIndex) {
        int activePort = getFirstActivePortIndex(physicalSlotIndex);
        int simState =
                SubscriptionManager.getSimStateForSlotIndex(getLogicalSlotIndex(physicalSlotIndex,
                        DEFAULT_PORT_INDEX));
                        activePort));
        return getSimApplicationStateFromSimState(simState);
    }