app-common

This commit is contained in:
septs 2025-02-27 15:09:33 +08:00
parent 10709bc2b5
commit 30761139c0
Signed by: septs
SSH key fingerprint: SHA256:ElK0p6DNkbsqYUdJ3I9QHDVf21SQD0c2r+hd7s/r5Co

View file

@ -452,7 +452,6 @@ class EuiccChannelManagerService : LifecycleService(), OpenEuiccContextMarker {
getString(R.string.task_profile_switch_failure),
R.drawable.ic_task_switch
) {
val flow = preferenceRepository.refreshAfterSwitchFlow
euiccChannelManager.beginTrackedOperation(slotId, portId) {
val (res, refreshed) = euiccChannelManager.withEuiccChannel(
slotId,
@ -465,7 +464,6 @@ class EuiccChannelManagerService : LifecycleService(), OpenEuiccContextMarker {
// makes the modem "busy". In this case, we can still switch by setting
// refresh to false, but then the switch cannot take effect until the
// user resets the modem manually by toggling airplane mode or rebooting.
flow.updatePreference(false)
Pair(channel.lpa.switchProfile(iccid, enable, refresh = false), false)
} else {
Pair(true, refresh)
@ -473,7 +471,6 @@ class EuiccChannelManagerService : LifecycleService(), OpenEuiccContextMarker {
}
if (!res) {
preferenceRepository.refreshAfterSwitchFlow.updatePreference(false)
throw RuntimeException("Could not switch profile")
}