diff options
author | wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com> | 2019-04-22 13:53:07 +0800 |
---|---|---|
committer | wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com> | 2019-04-22 13:53:07 +0800 |
commit | 46ac770dd55f51bc5d611ba3e5dd883e5f51edfa (patch) | |
tree | 6d13c6d635176d6ce411fabbe10cfcb2f6a4895a /src/homescreen.cpp | |
parent | f11aba0409610b3f6873006752579690225ca4be (diff) |
change hs_recoer
Change-Id: Iadfa3cafbde7df1faa06234c4633832819280bdd
Diffstat (limited to 'src/homescreen.cpp')
-rw-r--r-- | src/homescreen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/homescreen.cpp b/src/homescreen.cpp index cb8a633..2a0ee77 100644 --- a/src/homescreen.cpp +++ b/src/homescreen.cpp @@ -140,8 +140,9 @@ int hs_handshake::start(afb_api_t api) const struct hs_instance { HS_ClientManager *client_manager; // the connection session manager HS_AppInfo *app_info; // application info + HS_AppRecover *app_recover; - hs_instance() : client_manager(HS_ClientManager::instance()), app_info(HS_AppInfo::instance()) {} + hs_instance() : client_manager(HS_ClientManager::instance()), app_info(HS_AppInfo::instance()), app_recover(HS_AppRecover::instance()) {} int init(afb_api_t api); void setEventHook(const char *event, const event_hook_func f); void onEvent(afb_api_t api, const char *event, struct json_object *object); @@ -189,13 +190,12 @@ int hs_instance::init(afb_api_t api) return -1; } - HS_AppRecover *app_recover = new HS_AppRecover(); if(app_recover == nullptr) { AFB_ERROR("app_recover is nullptr."); return -1; } + app_recover->init(api); app_recover->startRecovery(api, hs_config.getRecoverMap()); - client_manager->setAppRecover(app_recover); return 0; } |