aboutsummaryrefslogtreecommitdiffstats
path: root/src/hs-apprecover.cpp
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-04-28 10:57:30 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-04-28 10:57:30 +0800
commit868898485c76ad5b0140e6528ba04c08878ea3ce (patch)
treea2327476b48bf0c6c6464dcae13d9a0de40fd96b /src/hs-apprecover.cpp
parent4cb1ba39335aa2a2d2e08481acd72a3682adaefe (diff)
fix bug
Change-Id: I0e8b6f58bb2051a17723d19d93e07820650a03a2
Diffstat (limited to 'src/hs-apprecover.cpp')
-rw-r--r--src/hs-apprecover.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/hs-apprecover.cpp b/src/hs-apprecover.cpp
index 5ccd039..c2464b1 100644
--- a/src/hs-apprecover.cpp
+++ b/src/hs-apprecover.cpp
@@ -71,9 +71,9 @@ HS_AppRecover* HS_AppRecover::instance(void)
*/
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;
}
@@ -102,8 +102,11 @@ void HS_AppRecover::startRecovery(afb_api_t api, recover_map &map)
}
// 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));
+ }
}
}
}
@@ -126,6 +129,7 @@ bool HS_AppRecover::registerRecoveredApp(const std::string &appid)
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);