From 4dfff743f03ec5ab6c806dda5d66337606ea5533 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 18 Aug 2017 16:36:08 +0900 Subject: [PATCH] Add logs when launching IME Change-Id: Ib9daa951765f5efe0bd1c59b84b8483193298f4c Signed-off-by: Jihoon Kim --- ism/extras/efl_panel/isf_panel_efl.cpp | 23 +++++++++++++++++++---- ism/src/isf_pkg.cpp | 3 +++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ism/extras/efl_panel/isf_panel_efl.cpp b/ism/extras/efl_panel/isf_panel_efl.cpp index 2f6c764..aadfcdb 100644 --- a/ism/extras/efl_panel/isf_panel_efl.cpp +++ b/ism/extras/efl_panel/isf_panel_efl.cpp @@ -1884,12 +1884,18 @@ static bool set_active_ise (const String &uuid, bool launch_ise) #ifdef HAVE_VCONF vconf_set_str (VCONFKEY_ISF_ACTIVE_KEYBOARD_UUID, uuid.c_str ()); #endif + LOGD ("Succeeded to launch IME (%s)\n", uuid.c_str ()); + } + else { + LOGW ("Failed to launch IME (%s)\n", uuid.c_str ()); } return ise_changed; } } + LOGW ("Failed to launch IME (%s)\n", uuid.c_str ()); + return false; } @@ -4189,9 +4195,12 @@ static bool update_ise_list (std::vector &list) if ((_info_manager->get_current_toolbar_mode () == TOOLBAR_KEYBOARD_MODE) && (modes[get_ise_index (_initial_ise_uuid)] != TOOLBAR_KEYBOARD_MODE)) { active_uuid = String (SCIM_COMPOSE_KEY_FACTORY_UUID); } + if (set_active_ise (active_uuid, _soft_keyboard_launched) == false) { - if (_initial_ise_uuid.compare (active_uuid)) + if (_initial_ise_uuid.compare (active_uuid)) { + LOGD ("Trying to launch initial IME (%s)\n", _initial_ise_uuid.c_str ()); set_active_ise (_initial_ise_uuid, _soft_keyboard_launched); + } } } else if (_info_manager->get_current_toolbar_mode () == TOOLBAR_HELPER_MODE) { // Check whether keyboard engine is installed String IMENGINE_KEY = String (SCIM_CONFIG_DEFAULT_IMENGINE_FACTORY) + String ("/") + String ("~other"); @@ -4214,7 +4223,8 @@ static bool update_ise_list (std::vector &list) } #endif } - + else + LOGW ("No IME list\n"); #ifdef HAVE_PKGMGR_INFO if (!pkgmgr) { @@ -6117,6 +6127,8 @@ static void slot_start_default_ise (void) set_keyboard_engine (String (SCIM_COMPOSE_KEY_FACTORY_UUID)); if (_info_manager->start_helper (uuid)) _soft_keyboard_launched = true; + else + LOGW ("Failed to start helper (%s)\n", uuid.c_str ()); } } } @@ -6204,7 +6216,7 @@ static void app_control_launch (const char *app_id) } app_control_destroy (app_control); - LOGD ("Launch %s\n", app_id); + LOGD ("Succeeded to launch IME (%s)\n", app_id); } static void slot_run_helper (const String &uuid, const String &config, const String &display) @@ -6265,6 +6277,7 @@ static void slot_run_helper (const String &uuid, const String &config, const Str } } /* execute type IME */ + LOGD ("Try to launch IME (%s)\n", uuid.c_str ()); app_control_launch (uuid.c_str ()); } else { @@ -6587,8 +6600,10 @@ static void change_keyboard_mode (TOOLBAR_MODE_T mode) } else { if (set_active_ise (uuid, true) == false) { - if (_initial_ise_uuid.compare(uuid)) + if (_initial_ise_uuid.compare(uuid)) { + LOGD ("Trying to launch initial IME (%s)\n", _initial_ise_uuid.c_str ()); set_active_ise (_initial_ise_uuid, true); + } } } } diff --git a/ism/src/isf_pkg.cpp b/ism/src/isf_pkg.cpp index ca04a09..13cfc6d 100644 --- a/ism/src/isf_pkg.cpp +++ b/ism/src/isf_pkg.cpp @@ -267,6 +267,9 @@ void isf_pkg_reload_ime_info_db(void) ret = pkgmgrinfo_appinfo_filter_add_string (handle, PMINFO_APPINFO_PROP_APP_CATEGORY, "http://tizen.org/category/ime"); if (ret == PMINFO_R_OK) { ret = pkgmgrinfo_appinfo_filter_foreach_appinfo (handle, isf_pkg_ime_app_list_cb, NULL); + if (ret != PMINFO_R_OK) { + LOGW ("pkgmgrinfo_appinfo_filter_foreach_appinfo failed(%d)\n", ret); + } } else { LOGE ("pkgmgrinfo_appinfo_filter_add_string failed(%d)", ret); -- 2.7.4