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

Signed-off-by: zhouyongfei <zhouyongfei@huawei.com>
This commit is contained in:
zhouyongfei
2022-02-17 11:55:07 +08:00
parent 6f9e301df2
commit cbd953a27b
+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);