Add some logs to debug key-block issue 57/149757/3
authorJunghoon Park <jh9216.park@samsung.com>
Wed, 9 Aug 2017 07:53:56 +0000 (16:53 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Thu, 21 Sep 2017 11:58:15 +0000 (11:58 +0000)
Change-Id: I644cae1a72248e64bc2b1ce72be573cb797244bb
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
src/aul_window.c

index 068d3d0..f809b22 100644 (file)
@@ -284,6 +284,7 @@ API int aul_window_get_focused_pid(pid_t *pid)
        GVariant *body;
        gint32 focused_pid = 0;
 
+       _W("call aul_window_get_focused_pid()");
        if (system_conn == NULL) {
                conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
                if (conn == NULL) {
@@ -307,6 +308,7 @@ API int aul_window_get_focused_pid(pid_t *pid)
                        G_DBUS_SEND_MESSAGE_FLAGS_NONE, -1, NULL, NULL, &err);
 
        if (!reply) {
+               _E("reply is null");
                if (err != NULL) {
                        _E("Failed to get info [%s]", err->message);
                        g_error_free(err);
@@ -318,11 +320,13 @@ API int aul_window_get_focused_pid(pid_t *pid)
        body = g_dbus_message_get_body(reply);
        if (!body) {
                res = -1;
+               _E("Body is null");
                goto out;
        }
 
        g_variant_get(body, "(i)", &focused_pid);
        *pid = (pid_t)focused_pid;
+       _W("result = %d", focused_pid);
 out:
        if (msg)
                g_object_unref(msg);