X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fhomescreen.cpp;h=7457f88cbb78f542a3dd2cc7b96ea65f776f0781;hb=560433708e4cbb466e170bc1370983f8eaaf23ca;hp=1caa23da2fcd2a3ef5af3353137b42b42e6a7437;hpb=fa01549aba442decaf7c6d5b655da2d15d1a32ed;p=apps%2Fagl-service-homescreen.git diff --git a/src/homescreen.cpp b/src/homescreen.cpp index 1caa23d..7457f88 100644 --- a/src/homescreen.cpp +++ b/src/homescreen.cpp @@ -72,6 +72,7 @@ int hs_handshake::hs_sts = hs_handshake::Handshake_Idle; */ 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(error == nullptr) { hs_handshake::hs_sts = hs_handshake::Handshake_WaitEvent; } @@ -94,6 +95,7 @@ void handshake_subscribe_callback(struct json_object *obj, const char *error, co */ int on_handshake_event(afb_api_t api, const char *event, struct json_object *object) { + AFB_NOTICE("received handshake event from windowmanager."); hs_handshake::hs_sts = hs_handshake::Handshake_Over; return 1; } @@ -112,6 +114,7 @@ int on_handshake_event(afb_api_t api, const char *event, struct json_object *obj */ int hs_handshake::start(afb_api_t api) const { + AFB_NOTICE("start handshake with windowmanager."); int ret = -1; setEventHook(sub_event.c_str(), on_handshake_event); int count = 0; @@ -183,12 +186,12 @@ int hs_instance::init(afb_api_t api) return -1; } - // const struct handshake_info *h = hs_config.getHandshakeInfo(); - // struct hs_handshake handshake(h->times, h->sleep); - // if(handshake.start(api) < 0) { - // AFB_ERROR("handshake with windowmanager failed."); - // return -1; - // } + const struct handshake_info *h = hs_config.getHandshakeInfo(); + struct hs_handshake handshake(h->times, h->sleep); + if(handshake.start(api) < 0) { + AFB_ERROR("handshake with windowmanager failed."); + return -1; + } if(app_recover == nullptr) { AFB_ERROR("app_recover is nullptr.");