|
@@ -130,6 +130,12 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener,
|
|
|
lifecycleScope.launch {
|
|
lifecycleScope.launch {
|
|
|
beginTrackedOperation {
|
|
beginTrackedOperation {
|
|
|
val res = if (enable) {
|
|
val res = if (enable) {
|
|
|
|
|
+ channel.lpa.profiles.find { it.isEnabled }?.let {
|
|
|
|
|
+ Log.i(TAG, "Profile ${it.iccid} is enabled; disabling before switching to new profile")
|
|
|
|
|
+ // Don't refresh -- we'll refresh later when enabling.
|
|
|
|
|
+ // Also ignore errors -- this is only a hard error if the enabling step fails.
|
|
|
|
|
+ channel.lpa.disableProfile(it.iccid, false)
|
|
|
|
|
+ }
|
|
|
channel.lpa.enableProfile(iccid)
|
|
channel.lpa.enableProfile(iccid)
|
|
|
} else {
|
|
} else {
|
|
|
channel.lpa.disableProfile(iccid)
|
|
channel.lpa.disableProfile(iccid)
|