|
@@ -256,7 +256,8 @@ void CHealthManagerEntity::OnCheckTimeTimeout()
|
|
|
ErrorCodeEnum eErrCode;
|
|
|
eErrCode = GetFunction()->GetSysVar("TerminalStage", csTermStage);
|
|
|
Dbg("OnCheckTimeTimeout::ToRestartByCenterSetting to get termstage %s", csTermStage.GetData());
|
|
|
- if (m_bInMainPage || csTermStage.Compare("A"))
|
|
|
+ //oilyang@20250313 in Main page('UIState' is 'M') or TerminalStage is (NOT 'S') AND (NOT 'A'),that is in close page which caused by terminal app
|
|
|
+ if (CheckUIStateIsM() || (!CheckUIStateIsM() && csTermStage.Compare("S") != 0 && csTermStage.Compare("A") != 0) )
|
|
|
{
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("THE key CenterSetting updated,we must restart framework right now.");
|
|
|
m_fsm.QuitFrameworkAndSaveInfo(RebootTrigger_Resource, RebootWay_Framework);
|
|
@@ -299,9 +300,12 @@ void CHealthManagerEntity::OnCheckTimeTimeout()
|
|
|
//2、have ever enter main page OR
|
|
|
if (!m_bSayIdle)
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("m_fsm.GetAccessAuthFlag():%d, m_bEnterMainPageEver:%d, m_bInMainPage:%d", m_fsm.GetAccessAuthFlag()
|
|
|
- , m_bEnterMainPageEver, m_bInMainPage);
|
|
|
- //oilyang@20241230 check accessauth flag AND if in Main page now or ever
|
|
|
- if (m_fsm.GetAccessAuthFlag() && (m_bEnterMainPageEver || (!m_bEnterMainPageEver && m_bInMainPage)))
|
|
|
+ , m_bEnterMainPageEver, CheckUIStateIsM());
|
|
|
+ //oilyang@20241230 check accessauth flag AND if in Main page ever
|
|
|
+ //oilyang@20250313 "Main page ever" has two scenes
|
|
|
+ //1. have enter main page ever,that is "m_bEnterMainPageEver is true"
|
|
|
+ //2. healthmanager have been lost at some point in the past,we check the "UIState" value if 'M'
|
|
|
+ if (m_fsm.GetAccessAuthFlag() && (m_bEnterMainPageEver || (!m_bEnterMainPageEver && CheckUIStateIsM())))
|
|
|
{
|
|
|
iCheckGuardian = CheckGuardianIsRun(true);
|
|
|
if (!m_bSayIdle)
|
|
@@ -1747,6 +1751,16 @@ void CHealthManagerEntity::EntityLostProc(CSimpleStringA entityName)
|
|
|
}
|
|
|
m_modRunInfo[entityName].bAbnormalBusy = false;
|
|
|
}
|
|
|
+bool CHealthManagerEntity::CheckUIStateIsM()
|
|
|
+{
|
|
|
+ if (m_bInMainPage)
|
|
|
+ return true;
|
|
|
+ CSimpleStringA uiState(true);
|
|
|
+ if (GetFunction()->GetSysVar("UIState", uiState) != Error_Succeed || uiState.Compare("M") != 0)
|
|
|
+ return false;
|
|
|
+ else
|
|
|
+ return true;
|
|
|
+}
|
|
|
SP_BEGIN_ENTITY_MAP()
|
|
|
SP_ENTITY(CHealthManagerEntity)
|
|
|
SP_END_ENTITY_MAP()
|