From: Sungmin Kwak Date: Tue, 21 Jul 2015 00:29:27 +0000 (+0900) Subject: Add more logs for TCT failed case X-Git-Tag: accepted/tizen/mobile/20150721.092036~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F44313%2F1;p=platform%2Fcore%2Fuifw%2Fisf.git Add more logs for TCT failed case Change-Id: I7484caab008c09bf4ade4d6495c187eb82f0855d --- diff --git a/ism/src/isf_control.cpp b/ism/src/isf_control.cpp index 02c9dee..a88b029 100644 --- a/ism/src/isf_control.cpp +++ b/ism/src/isf_control.cpp @@ -32,6 +32,11 @@ #include "scim.h" #include "isf_control.h" +#include +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "ISF_CONTROL" using namespace scim; @@ -311,12 +316,16 @@ EAPI int isf_control_get_active_ime (char **appid) String strUuid; int ret = 0; IMControlClient imcontrol_client; - if (!imcontrol_client.open_connection ()) + if (!imcontrol_client.open_connection ()) { + LOGW("open_connection failed"); return -1; + } imcontrol_client.prepare (); - if (!imcontrol_client.get_active_ise (strUuid)) + if (!imcontrol_client.get_active_ise (strUuid)) { + LOGW("get_active_ise failed"); ret = -1; + } imcontrol_client.close_connection (); @@ -325,8 +334,10 @@ EAPI int isf_control_get_active_ime (char **appid) *appid = strUuid.length () ? strdup (strUuid.c_str ()) : NULL; - if (*appid == NULL) + if (*appid == NULL) { + LOGW("appid is invalid"); return -1; + } else return strUuid.length (); } @@ -395,25 +406,35 @@ EAPI int isf_control_show_ime_selector (void) EAPI int isf_control_is_ime_enabled (const char *appid, bool *enabled) { - if (!appid || !enabled || strlen(appid) < 1) + if (!appid || !enabled || strlen(appid) < 1) { + LOGW("Invalid parameter"); return -1; + } int nEnabled = -1; int ret = 0; IMControlClient imcontrol_client; - imcontrol_client.open_connection (); + if (!imcontrol_client.open_connection ()) { + LOGW("open_connection failed"); + return -1; + } + imcontrol_client.prepare (); - if (!imcontrol_client.is_helper_ise_enabled (appid, nEnabled)) + if (!imcontrol_client.is_helper_ise_enabled (appid, nEnabled)) { + LOGW("is_helper_ise_enabled failed"); ret = -1; + } imcontrol_client.close_connection (); if (ret == -1) return -1; - if (nEnabled < 0) + if (nEnabled < 0) { + LOGW("Failed; appid(%s), nEnabled=%d", appid, nEnabled); return -1; + } else *enabled = static_cast(nEnabled);