diff --git a/services/edm_plugin/src/disallowed_sim_plugin.cpp b/services/edm_plugin/src/disallowed_sim_plugin.cpp index 17a1e58ed7ed2428dea206982e53a1b8c995109d..88ee8929f3c91c7d0c8bf84ada1edaa42fd92091 100644 --- a/services/edm_plugin/src/disallowed_sim_plugin.cpp +++ b/services/edm_plugin/src/disallowed_sim_plugin.cpp @@ -14,6 +14,7 @@ */ #include "disallowed_sim_plugin.h" +#include "core_service_client.h" #include "parameters.h" #include "edm_ipc_interface_code.h" #include "iplugin_manager.h" @@ -60,6 +61,10 @@ ErrCode DisallowedSimPlugin::OnSetPolicy(int32_t &data, int32_t ¤tData, in EDMLOGE("DisallowedSimPlugin:OnSetPolicy SetParameter fail, slotId %{public}d", data); return EdmReturnErrCode::SYSTEM_ABNORMALLY; } + int32_t simId = Telephony::CoreServiceClient::GetInstance().GetSimId(data); + if (simId > 0) { + Telephony::CoreServiceClient::GetInstance().SetActiveSim(data, 0); + } mergeData |= currentData; return ERR_OK;