*/
int HS_AppRecover::init(afb_api_t api)
{
+ setEventHook("windowmanager/screenUpdated", on_screen_update_event);
HS_WmProxy wm_proxy;
wm_proxy.subscribe(api, HS_WmProxy::Event_ScreenUpdated);
- setEventHook("windowmanager/screenUpdated", on_screen_update_event);
return 0;
}
}
// recover application
- m_recovering_set.insert(m.appid);
- afm_proxy.start(api, HS_AppInfo::instance()->getAppProperty(m.appid, _keyId));
+ auto it = m_recovering_set.find(m.appid);
+ if(it == m_recovering_set.end()) {
+ m_recovering_set.insert(m.appid);
+ afm_proxy.start(api, HS_AppInfo::instance()->getAppProperty(m.appid, _keyId));
+ }
}
}
}
return ret;
}
+ AFB_INFO("recover appid=[%s].", appid.c_str());
auto it = m_recovering_set.find(appid);
if(it != m_recovering_set.end()) {
m_recovering_set.erase(appid);