!79 修复主用户下不用销毁service的bug

Merge pull request !79 from demon/master
This commit is contained in:
openharmony_ci
2022-02-17 09:33:15 +00:00
committed by Gitee
+2 -2
View File
@@ -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);