esim: faster switching (#35344)

* esim: lpac doesnt need disable here

* more red diff
pull/35354/head
Trey Moen 4 weeks ago committed by GitHub
parent 427a61ab12
commit 44d233337d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      system/hardware/tici/esim.py

@ -54,15 +54,10 @@ class TiciLPA(LPABase):
self._validate_successful(self._invoke('profile', 'nickname', iccid, nickname))
def switch_profile(self, iccid: str) -> None:
self._enable_profile(iccid)
def _enable_profile(self, iccid: str) -> None:
self._validate_profile_exists(iccid)
latest = self.get_active_profile()
if latest:
if latest.iccid == iccid:
return
self._validate_successful(self._invoke('profile', 'disable', latest.iccid))
if latest and latest.iccid == iccid:
return
self._validate_successful(self._invoke('profile', 'enable', iccid))
self._process_notifications()

Loading…
Cancel
Save