|
|
@@ -499,7 +499,8 @@ void ResourceWatcherEntity::InstallThirdPartyProgram(SpReqAnsContext<ResourceWat
|
|
|
ErrorCodeEnum tmpResult(Error_Succeed);
|
|
|
CSimpleStringA tmpMsg(true);
|
|
|
|
|
|
- Dbg("ctx-req context: %d, %d, %d", ctx->Req.type, ctx->Req.reserved1, ctx->Req.reserved2);
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_USER)("ctx-req context: %d, %d, %d", ctx->Req.type, ctx->Req.reserved1, ctx->Req.reserved2);
|
|
|
+ LogWarn(Severity_Low, Error_Debug, LOG_RESOURCEWATCHE_INSTALL_THIRDPARTY, CSimpleStringA::Format("InstallThirdPartyProgram: ctx-req context: %d, %d, %d", ctx->Req.type, ctx->Req.reserved1, ctx->Req.reserved2));
|
|
|
|
|
|
bool sogouInstalled = false;
|
|
|
const bool doTryRestart = (ctx->Req.reserved1 != 1);
|
|
|
@@ -819,13 +820,14 @@ void ResourceWatcherEntity::InstallThirdPartyProgram(SpReqAnsContext<ResourceWat
|
|
|
eErr = m_pRWClient->ControlTerminalLife(detReq, detAns, 3000);
|
|
|
if (eErr == Error_Succeed)
|
|
|
{
|
|
|
- LogWarn(Severity_Low, Error_Succeed, 0, "搜狗安装成功, 设备即将重启。");
|
|
|
+ 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, "调用健康实体重启设备失败!");
|
|
|
+ LogWarn(Severity_Middle, Error_Unexpect, 0, CSimpleStringA::Format("HealthManagerService::ControlTerminalLife failed: %s", SpStrError(eErr)));
|
|
|
}
|
|
|
m_pRWClient->GetFunction()->CloseSession();
|
|
|
+ m_pRWClient = NULL;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1005,6 +1007,8 @@ void ResourceWatcherEntity::UninstallThirdPartyProgram(SpReqAnsContext<ResourceW
|
|
|
ErrorCodeEnum tmpResult(Error_Succeed);
|
|
|
CSimpleStringA tmpMsg(true);
|
|
|
|
|
|
+ LogWarn(Severity_Low, Error_Debug, LOG_RESOURCEWATCHE_UNINSTALL_THIRDPARTYPROGRAM, CSimpleStringA::Format("UninstallThirdPartyProgram: ctx-req context: %d, %d, %d", ctx->Req.type, ctx->Req.reserved1, ctx->Req.reserved2));
|
|
|
+
|
|
|
if (ctx->Req.type == 1) {
|
|
|
Dbg("to uninstall sogou input...");
|
|
|
CSimpleStringA strInstallPkgPath;
|
|
|
@@ -1062,6 +1066,8 @@ void ResourceWatcherEntity::RestartThirdPartyProgram(SpReqAnsContext<ResourceWat
|
|
|
ErrorCodeEnum tmpResult(Error_Succeed);
|
|
|
CSimpleStringA tmpMsg(true);
|
|
|
|
|
|
+ LogWarn(Severity_Low, Error_Debug, LOG_RESOURCEWATCHE_RESTART_THIRDPARTYPROGRAM, CSimpleStringA::Format("RestartThirdPartyProgram: ctx-req context: %d, %d, %d", ctx->Req.type, ctx->Req.reserved1, ctx->Req.reserved2));
|
|
|
+
|
|
|
if (ctx->Req.type == 1)
|
|
|
{//重启搜狗输入法
|
|
|
static int old_process_id[2] = { -1, -1 };
|