From: wang_zhiqiang Date: Mon, 22 Apr 2019 05:22:56 +0000 (+0800) Subject: don't use area info X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=f11aba0409610b3f6873006752579690225ca4be;p=apps%2Fagl-service-homescreen.git don't use area info Change-Id: I8c466c1d325574b6b4c351e80f3aa12c4e5d2c47 --- diff --git a/conf/hs-conf.json b/conf/hs-conf.json index 9a7d934..35aabf3 100644 --- a/conf/hs-conf.json +++ b/conf/hs-conf.json @@ -25,7 +25,7 @@ "default-lastmode": [ { "appid": "launcher", - "area": "normal.full" + "visibility": "visible" } ], "normal-apps": [ diff --git a/conf/lastmode.json b/conf/lastmode.json index fbae6e9..12387ad 100644 --- a/conf/lastmode.json +++ b/conf/lastmode.json @@ -1,10 +1,10 @@ [ { "appid": "navigation", - "area": "split.main" + "visibility": "visible" }, { "appid": "video", - "area": "split.sub" + "visibility": "visible" } ] \ No newline at end of file diff --git a/src/hs-apprecover.cpp b/src/hs-apprecover.cpp index 8e5545c..9bd0cf2 100644 --- a/src/hs-apprecover.cpp +++ b/src/hs-apprecover.cpp @@ -39,7 +39,6 @@ void HS_AppRecover::startRecovery(afb_api_t api, recover_map &map) for(auto &m : map[key]){ struct app_recover_info recover_info; recover_info.recover_type = key; - recover_info.area = m.area; recover_info.visibility = m.visibility; m_recover_apps_list[m.appid] = std::move(recover_info); @@ -68,10 +67,7 @@ bool HS_AppRecover::registerRecoveredApp(std::string &appid) auto ip = m_recover_apps_list.find(appid); if(ip != m_recover_apps_list.end() && ip->second.visibility) { - // TBD, call setWindowResource - struct json_object *push_obj = json_object_new_object(); - json_object_object_add(push_obj, _keyArea, json_object_new_string(ip->second.area.c_str())); - HS_ClientManager::instance()->pushEvent("showWindow", push_obj, appid); + HS_ClientManager::instance()->pushEvent("showWindow", nullptr, appid); } } diff --git a/src/hs-apprecover.h b/src/hs-apprecover.h index 52ba38b..f46846d 100644 --- a/src/hs-apprecover.h +++ b/src/hs-apprecover.h @@ -23,7 +23,6 @@ struct app_recover_info { std::string recover_type; - std::string area; bool visibility; }; diff --git a/src/hs-config.cpp b/src/hs-config.cpp index 17b086a..b8f9f5b 100644 --- a/src/hs-config.cpp +++ b/src/hs-config.cpp @@ -109,7 +109,7 @@ int HS_Config::parseConfig(void) /** * get recover application information - * appid, visibility, display area + * appid, visibility * * #### Parameters * - obj : application information @@ -134,12 +134,6 @@ std::vector HS_Config::getRecoverAppInfo(struct json_ob v_app_info.clear(); return v_app_info; } - if(json_object_object_get_ex(info_obj, key_area.c_str(), &value_obj)) { - info.area = json_object_get_string(value_obj); - } - else { - info.area = "normal.full"; - } if(json_object_object_get_ex(info_obj, key_visibility.c_str(), &value_obj)) { std::string visibility = json_object_get_string(value_obj); info.visibility = (visibility == "visible") ? true:false; diff --git a/src/hs-config.h b/src/hs-config.h index 849dc4f..d422248 100644 --- a/src/hs-config.h +++ b/src/hs-config.h @@ -30,7 +30,6 @@ struct handshake_info { struct recover_app_info { std::string appid; // application id like "dashboard" - std::string area; // application default display area bool visibility; // the visibility when system starting }; @@ -62,7 +61,6 @@ private: const std::string key_recover = "recover"; const std::string key_appid = "appid"; const std::string key_visibility = "visibility"; - const std::string key_area = "area"; struct json_object *m_hs_conf; struct json_object *m_lastmode;