|
|
@@ -2310,34 +2310,6 @@ void ResourceWatcherEntity::InstallSogou(SpReqAnsContext<ResourceWatcherService_
|
|
|
ctx->Ans.result = tmpResult;
|
|
|
ctx->Ans.msg = tmpMsg;
|
|
|
ctx->Answer(tmpResult, warnCode);
|
|
|
-
|
|
|
-
|
|
|
- if (sogouInstalled && doTryRestart && !info.program.IsTSFVersion()) {
|
|
|
- HealthManagerService_ClientBase* m_pRWClient = new HealthManagerService_ClientBase(this);
|
|
|
- ErrorCodeEnum eErr = m_pRWClient->Connect();
|
|
|
-
|
|
|
- if (eErr != Error_Succeed) {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("HealthManager connected failed.");
|
|
|
- m_pRWClient->SafeDelete();
|
|
|
- m_pRWClient = NULL;
|
|
|
- }
|
|
|
- else {
|
|
|
- HealthManagerService_ControlTerminalLife_Req detReq;
|
|
|
- HealthManagerService_ControlTerminalLife_Ans detAns;
|
|
|
- detReq.cmdType = 4;
|
|
|
- detReq.reason = 0;
|
|
|
- eErr = (*m_pRWClient)(EntityResource::getLink().upgradeLink())->ControlTerminalLife(detReq, detAns, 3000);
|
|
|
- if (eErr == Error_Succeed) {
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_RESOURCEWATCHE_RESTARTPC_AFTER_INSTALLED_SOGOUINPUT, "Ask HealthManagerService for restarting PC succ after installing sogouinput");
|
|
|
- }
|
|
|
- else {
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, 0, CSimpleStringA::Format("HealthManagerService::ControlTerminalLife failed: %s", SpStrError(eErr)));
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA5A07")("HealthManagerService::ControlTerminalLife failed: %s", SpStrError(eErr));
|
|
|
- }
|
|
|
- m_pRWClient->GetFunction()->CloseSession();
|
|
|
- m_pRWClient = NULL;
|
|
|
- }
|
|
|
- }
|
|
|
#else
|
|
|
|
|
|
//win-sogou 包名
|