diff --git a/services/src/input_method_system_ability.cpp b/services/src/input_method_system_ability.cpp index c593627..2d59c93 100644 --- a/services/src/input_method_system_ability.cpp +++ b/services/src/input_method_system_ability.cpp @@ -547,9 +547,7 @@ namespace MiscServices { IMSA_HILOGE("Aborted! %s\n", ErrorCode::ToString(ErrorCode::ERROR_BAD_PARAMETERS)); return ErrorCode::ERROR_BAD_PARAMETERS; } - std::string defaultIme = ParaHandle::GetDefaultIme(userId_); - StopInputService(defaultIme); int32_t userId = msg->msgContent_->ReadInt32(); userId_ = userId; IMSA_HILOGI("InputMethodSystemAbility::OnUserStarted userId = %{public}u", userId); @@ -560,6 +558,8 @@ namespace MiscServices { return ErrorCode::ERROR_USER_ALREADY_STARTED; } + StopInputService(defaultIme); + setting = new PerUserSetting(userId); setting->Initialize(); PerUserSession *session = new PerUserSession(userId);