|
@@ -21,7 +21,7 @@ fun TelephonyManager.setDsdsEnabled(euiccManager: EuiccChannelManager, enabled:
|
|
|
|
|
|
|
|
// Disable all eSIM profiles before performing a DSDS switch (only for internal eSIMs)
|
|
// Disable all eSIM profiles before performing a DSDS switch (only for internal eSIMs)
|
|
|
knownChannels.forEach {
|
|
knownChannels.forEach {
|
|
|
- if (!it.removable) {
|
|
|
|
|
|
|
+ if (!it.port.card.isRemovable) {
|
|
|
it.lpa.disableActiveProfileWithUndo(false)
|
|
it.lpa.disableActiveProfileWithUndo(false)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -44,7 +44,7 @@ fun TelephonyManager.updateSimSlotMapping(
|
|
|
|
|
|
|
|
val undo = unmapped.mapNotNull { mapping ->
|
|
val undo = unmapped.mapNotNull { mapping ->
|
|
|
euiccManager.findEuiccChannelByPortBlocking(mapping.physicalSlotIndex, mapping.portIndex)?.let { channel ->
|
|
euiccManager.findEuiccChannelByPortBlocking(mapping.physicalSlotIndex, mapping.portIndex)?.let { channel ->
|
|
|
- if (!channel.removable) {
|
|
|
|
|
|
|
+ if (!channel.port.card.isRemovable) {
|
|
|
return@mapNotNull channel.lpa.disableActiveProfileWithUndo(false)
|
|
return@mapNotNull channel.lpa.disableActiveProfileWithUndo(false)
|
|
|
} else {
|
|
} else {
|
|
|
// Do not do anything for external eUICCs -- we can't really trust them to work properly
|
|
// Do not do anything for external eUICCs -- we can't really trust them to work properly
|
|
@@ -75,9 +75,6 @@ fun SubscriptionManager.tryRefreshCachedEuiccInfo(cardId: Int) {
|
|
|
|
|
|
|
|
// Every EuiccChannel we use here should be backed by a RealUiccPortInfoCompat
|
|
// Every EuiccChannel we use here should be backed by a RealUiccPortInfoCompat
|
|
|
// except when it is from a USB card reader
|
|
// except when it is from a USB card reader
|
|
|
-val EuiccChannel.removable
|
|
|
|
|
- get() = (port as? RealUiccPortInfoCompat)?.card?.isRemovable ?: true
|
|
|
|
|
-
|
|
|
|
|
val EuiccChannel.cardId
|
|
val EuiccChannel.cardId
|
|
|
get() = (port as? RealUiccPortInfoCompat)?.card?.cardId ?: -1
|
|
get() = (port as? RealUiccPortInfoCompat)?.card?.cardId ?: -1
|
|
|
|
|
|