diff options
author | wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com> | 2019-06-27 09:04:02 +0800 |
---|---|---|
committer | wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com> | 2019-06-27 09:04:02 +0800 |
commit | 5a25fe4b6304236ead0ecc0cd8f303557ba4140f (patch) | |
tree | 0a7588c83e14ceadf86fbc919d5c4067f0a7b1d7 | |
parent | bd0cc8d67227109c96f875d03d0e713cfd2a6e1b (diff) |
change to push event after navi and poi startedsandbox/wangzhiqiang/als2019
Change-Id: I95942ff6b15a25c7582475fb0084c753a829fc68
-rw-r--r-- | src/hs-vuiadapter.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/hs-vuiadapter.cpp b/src/hs-vuiadapter.cpp index 4bfc24d..aba009d 100644 --- a/src/hs-vuiadapter.cpp +++ b/src/hs-vuiadapter.cpp @@ -134,7 +134,7 @@ void Vui_Navigation::set_destination(afb_api_t api, struct json_object *object) auto b_pair = std::make_pair<bool, bool>(false, false); if(HS_ClientManager::instance()->isAppStarted(std::string(_poi))) { b_pair.first = true; - set_destination2poi(api); + // set_destination2poi(api); } else { this->addListenAppId(_poi); @@ -145,7 +145,7 @@ void Vui_Navigation::set_destination(afb_api_t api, struct json_object *object) if(HS_ClientManager::instance()->isAppStarted(std::string(_navigation))) { b_pair.second = true; - start_navigation(api); + // start_navigation(api); } else { this->addListenAppId(_navigation); @@ -153,8 +153,14 @@ void Vui_Navigation::set_destination(afb_api_t api, struct json_object *object) HS_AfmMainProxy afm_proxy; afm_proxy.start(api, id); } + m_start_flg.swap(b_pair); - if (!listenAppEmpty()) { + if(m_start_flg.first && m_start_flg.second) { + clearListenAppSet(); + set_destination2poi(api); + start_navigation(api); + } + else if (!listenAppEmpty()) { HS_ClientManager::instance()->addListener(this); } } @@ -193,11 +199,11 @@ void Vui_Navigation::notify(afb_api_t api, std::string appid) if (appid == _poi) { m_start_flg.first = true; // sleep(1); - set_destination2poi(api); + // set_destination2poi(api); } else if(appid == _navigation) { m_start_flg.second = true; - start_navigation(api); + // start_navigation(api); } else { AFB_WARNING("%s isn't interest app.", appid.c_str()); @@ -207,6 +213,8 @@ void Vui_Navigation::notify(afb_api_t api, std::string appid) if(m_start_flg.first && m_start_flg.second) { clearListenAppSet(); + set_destination2poi(api); + start_navigation(api); // HS_ClientManager::instance()->removeListener(this); } } |