iface-modem: skip modem_after_sim_unlock() for CDMA-only devices
We don't support SIM/RUIM on CDMA devices (yet), so for now it makes no sense to run the after-sim-unlock step on CDMA-only devices where a SIM won't be present. Unfortunately we don't know at this point whether there is a SIM or not, so if the modem is a multi-mode device (implying it has a SIM slot) and its plugin implements the modem_after_sim_unlock() hook, the hook will still be executed and might cause an unecessary delay when a SIM is not inserted.
This commit is contained in:
@@ -2705,10 +2705,12 @@ update_lock_info_context_step (UpdateLockInfoContext *ctx)
|
|||||||
|
|
||||||
case UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK:
|
case UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK:
|
||||||
/* If we get that no lock is required, run the after SIM unlock step
|
/* If we get that no lock is required, run the after SIM unlock step
|
||||||
* in order to wait for the SIM to get ready */
|
* in order to wait for the SIM to get ready. Skip waiting on
|
||||||
if (ctx->lock == MM_MODEM_LOCK_NONE ||
|
* CDMA-only modems where we don't support a SIM. */
|
||||||
ctx->lock == MM_MODEM_LOCK_SIM_PIN2 ||
|
if (!mm_iface_modem_is_cdma_only (ctx->self) &&
|
||||||
ctx->lock == MM_MODEM_LOCK_SIM_PUK2) {
|
(ctx->lock == MM_MODEM_LOCK_NONE ||
|
||||||
|
ctx->lock == MM_MODEM_LOCK_SIM_PIN2 ||
|
||||||
|
ctx->lock == MM_MODEM_LOCK_SIM_PUK2)) {
|
||||||
if (MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->modem_after_sim_unlock != NULL &&
|
if (MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->modem_after_sim_unlock != NULL &&
|
||||||
MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->modem_after_sim_unlock_finish != NULL) {
|
MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->modem_after_sim_unlock_finish != NULL) {
|
||||||
mm_dbg ("SIM is ready, running after SIM unlock step...");
|
mm_dbg ("SIM is ready, running after SIM unlock step...");
|
||||||
|
Reference in New Issue
Block a user