Merge "Merge cros/upstream to cros/master"
diff --git a/src/mm-base-sim.c b/src/mm-base-sim.c
index d1f70e3..be25e86 100644
--- a/src/mm-base-sim.c
+++ b/src/mm-base-sim.c
@@ -2330,6 +2330,7 @@
INITIALIZATION_STEP_SIM_IDENTIFIER,
INITIALIZATION_STEP_IMSI,
INITIALIZATION_STEP_OPERATOR_ID,
+ INITIALIZATION_STEP_OPERATOR_ID_RETRY,
INITIALIZATION_STEP_OPERATOR_NAME,
INITIALIZATION_STEP_EMERGENCY_NUMBERS,
INITIALIZATION_STEP_PREFERRED_NETWORKS,
@@ -2680,6 +2681,26 @@
ctx->step++;
/* Fall through */
+ case INITIALIZATION_STEP_OPERATOR_ID_RETRY:
+ /* This is a retry of the previous step. The query only happens if the
+ * operator_identifier is still null. */
+ /* Don't load operator ID if the SIM is known to be an eSIM without
+ * profiles; otherwise (if physical SIM, or if eSIM with profile, or if
+ * SIM type unknown) try to load it. */
+ if (IS_ESIM_WITHOUT_PROFILES (self))
+ mm_obj_dbg (self, "not loading operator ID in eSIM without profiles");
+ else if (mm_gdbus_sim_get_operator_identifier (MM_GDBUS_SIM (self)) == NULL &&
+ MM_BASE_SIM_GET_CLASS (self)->load_operator_identifier &&
+ MM_BASE_SIM_GET_CLASS (self)->load_operator_identifier_finish) {
+ MM_BASE_SIM_GET_CLASS (self)->load_operator_identifier (
+ self,
+ (GAsyncReadyCallback)init_load_operator_identifier_ready,
+ task);
+ return;
+ }
+ ctx->step++;
+ /* Fall through */
+
case INITIALIZATION_STEP_OPERATOR_NAME:
/* Don't load operator name if the SIM is known to be an eSIM without
* profiles; otherwise (if physical SIM, or if eSIM with profile, or if