Merge "[MEP] psim->esim, don't skip carrierConfigChanged with subId -1" into tm-qpr-dev am: da58404ea6

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

Change-Id: Id8b05f8faaadee52922e785b6e15c40eb1dd12de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
SongFerng Wang
2022-10-07 14:09:58 +00:00
committed by Automerger Merge Worker
2 changed files with 21 additions and 6 deletions

View File

@@ -141,7 +141,8 @@ public class UiccSlotUtil {
inactiveRemovableSlot,
/*removable sim's port Id*/ TelephonyManager.DEFAULT_PORT_INDEX,
excludedLogicalSlotIndex),
context);
context,
/*isWaitingForValidSubId=*/ true);
}
/**
@@ -179,7 +180,8 @@ public class UiccSlotUtil {
performSwitchToSlot(telMgr,
prepareUiccSlotMappings(uiccSlotMappings, /*slot is not psim*/ false,
physicalSlotId, port, excludedLogicalSlotIndex),
context);
context,
/*isWaitingForValidSubId=*/ false);
}
/**
@@ -231,7 +233,8 @@ public class UiccSlotUtil {
}
private static void performSwitchToSlot(TelephonyManager telMgr,
Collection<UiccSlotMapping> uiccSlotMappings, Context context)
Collection<UiccSlotMapping> uiccSlotMappings, Context context,
boolean isWaitingForValidSubId)
throws UiccSlotsException {
CarrierConfigChangedReceiver receiver = null;
long waitingTimeMillis =
@@ -241,7 +244,7 @@ public class UiccSlotUtil {
DEFAULT_WAIT_AFTER_SWITCH_TIMEOUT_MILLIS);
try {
CountDownLatch latch = new CountDownLatch(1);
receiver = new CarrierConfigChangedReceiver(latch);
receiver = new CarrierConfigChangedReceiver(latch, isWaitingForValidSubId);
receiver.registerOn(context);
telMgr.setSimSlotMapping(uiccSlotMappings);
latch.await(waitingTimeMillis, TimeUnit.MILLISECONDS);