[
{
"appid": "phone",
- "visibility": "visible",
- "after": "homescreen"
+ "visibility": "visible"
}
]
\ No newline at end of file
void handshake_subscribe_callback(struct json_object *obj, const char *error, const char *info)
{
AFB_NOTICE("subscribe handshake reply: obj=%s, error=%s, info=%s", json_object_to_json_string(obj), error, info);
+ if(hs_handshake::hs_sts == hs_handshake::Handshake_Over) {
+ return;
+ }
if(error == nullptr) {
hs_handshake::hs_sts = hs_handshake::Handshake_WaitEvent;
}
void HS_ClientManager::checkRegisterApp(afb_api_t api, const std::string &appid)
{
if(HS_AppRecover::instance()->registerRecoveredApp(api, appid)) {
- AFB_INFO("register recover application.");
+ AFB_INFO("register recover application %s.", appid.c_str());
return;
}
if(json_object_get_type(m_lastmode) == json_type_array ) {
struct std::vector<recover_app_info> v_lastmode = std::move(getRecoverAppInfo(m_lastmode));
if(!v_lastmode.empty()) { // got saving lastmode isn't null, instead of default lastmode
+ for(auto &it : v_lastmode) {
+ if(it.after.empty() && !m_recover_map[keys_recover_type[1]].empty()) {
+ it.after = m_recover_map[keys_recover_type[1]][0].after;
+ }
+ }
m_recover_map[keys_recover_type[1]] = std::move(v_lastmode);
}
}