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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17630455

Change-Id: I2d81ace9cf2ef4c7b7ca4dc1acd2a52037b9b94f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Shivakumar Neginal
2022-04-11 05:27:05 +00:00
committed by Automerger Merge Worker

View File

@@ -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);
}