From: sungwook park Date: Fri, 12 Jan 2018 07:42:23 +0000 (+0000) Subject: Revert "Handle the exceptional case that /opt is not yet mounted" X-Git-Tag: accepted/tizen/unified/20180115.074446~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae7bb274e716bafbaaecf0dcde07ceecc58c3cc2;p=platform%2Fcore%2Fuifw%2Fisf.git Revert "Handle the exceptional case that /opt is not yet mounted" This reverts commit 2aa7c7a7f136fc35762cd252e9ef99d725dbba28. Change-Id: I5c3b11f5e4b545b92253f82f548764f58c6a785f --- diff --git a/ism/extras/efl_panel/Makefile.am b/ism/extras/efl_panel/Makefile.am index 4ca37a8..a814004 100644 --- a/ism/extras/efl_panel/Makefile.am +++ b/ism/extras/efl_panel/Makefile.am @@ -41,7 +41,6 @@ endif isf_panel_efl_CXXFLAGS = @ECOREX_CFLAGS@ \ @ECORE_WL_CFLAGS@ \ @ECORE_CFLAGS@ \ - @ECORE_FILE_CFLAGS@ \ @ECORE_IMF_CFLAGS@ \ @EINA_CFLAGS@ \ @VCONF_CFLAGS@ \ @@ -63,7 +62,6 @@ isf_panel_efl_LDFLAGS = @LTLIBINTL@ -rpath $(libdir) \ @ECOREX_LIBS@ \ @ECORE_WL_LIBS@ \ @ECORE_LIBS@ \ - @ECORE_FILE_LIBS@ \ @ECORE_IMF_LIBS@ \ @EINA_LIBS@ \ @VCONF_LIBS@ \ diff --git a/ism/extras/efl_panel/isf_panel_efl.cpp b/ism/extras/efl_panel/isf_panel_efl.cpp index a60e958..8ec6b1c 100644 --- a/ism/extras/efl_panel/isf_panel_efl.cpp +++ b/ism/extras/efl_panel/isf_panel_efl.cpp @@ -39,7 +39,6 @@ #include #include #include -#include #include #include "scim_private.h" #include "scim.h" @@ -518,8 +517,6 @@ static Ecore_Timer *_ise_check_pid_alive_timer = NULL; static const double _ise_check_pid_alive_time = 1.0f; static String _ise_check_pid_alive_uuid; -static Ecore_Timer *g_monitor_user_data_path_timer = NULL; - enum { EMOJI_IMAGE_WIDTH = 0, EMOJI_IMAGE_HEIGHT, @@ -2126,89 +2123,7 @@ static bool set_active_ise (const String &uuid, bool launch_ise) } } - LOGW ("Failed to launch IME (%s), %d", uuid.c_str (), _ime_info.size()); - - return false; -} - -/** - * @brief Set temporary ISE. - * - * @param uuid The ISE's uuid. - * - * @return false if ISE change is failed, otherwise return true. - */ -static bool set_temporary_ise (const String &uuid) -{ - SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; - LOGD ("set temporary ISE (%s)", uuid.c_str ()); - - if (uuid.length () <= 0) - return false; - - bool ise_changed = false; - - if (_ime_info.size () == 0) { -#ifdef HAVE_PKGMGR_INFO - pkgmgrinfo_appinfo_filter_h handle; - int ret = pkgmgrinfo_appinfo_filter_create (&handle); - if (ret == PMINFO_R_OK) { - /* Add the package info for the IME that matches with our uuid only */ - ret = pkgmgrinfo_appinfo_filter_add_string (handle, PMINFO_APPINFO_PROP_APP_ID, uuid.c_str ()); - if (ret == PMINFO_R_OK) - ret = pkgmgrinfo_appinfo_filter_foreach_appinfo (handle, get_ime_app_list_cb, NULL); - else { - LOGE ("pkgmgrinfo_appinfo_filter_add_string failed(%d)", ret); - } - pkgmgrinfo_appinfo_filter_destroy (handle); - } else { - LOGE ("pkgmgrinfo_appinfo_filter_create failed(%d)", ret); - } -#endif - } - -#ifdef HAVE_PKGMGR_INFO - pkgmgrinfo_appinfo_h handle = NULL; - int ret = pkgmgr_get_appinfo (uuid.c_str (), &handle); - if (ret != PMINFO_R_OK) { - LOGW ("appid \"%s\" is invalid.", uuid.c_str ()); - return false; - } - - if (handle) { - char *label = NULL; - ret = pkgmgrinfo_appinfo_get_label (handle, &label); - if (ret != PMINFO_R_OK) { - LOGW ("Could not get label for appid '%s'", uuid.c_str ()); - pkgmgrinfo_appinfo_destroy_appinfo (handle); - return false; - } - - ise_changed = set_helper_ise (uuid, true); - - if (ise_changed) { - _info_manager->set_current_toolbar_mode (TOOLBAR_HELPER_MODE); - if (_TV) - _info_manager->set_current_helper_option (SCIM_HELPER_STAND_ALONE | SCIM_HELPER_NEED_SCREEN_INFO | - SCIM_HELPER_AUTO_RESTART | ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT); - else - _info_manager->set_current_helper_option (SCIM_HELPER_STAND_ALONE | SCIM_HELPER_NEED_SCREEN_INFO | - SCIM_HELPER_AUTO_RESTART); - String label_string = label; - _info_manager->set_current_ise_name (label_string); - -#ifdef HAVE_VCONF - vconf_set_str (VCONFKEY_ISF_ACTIVE_KEYBOARD_UUID, uuid.c_str ()); -#endif - } else { - LOGW ("Failed to launch IME (%s)", uuid.c_str ()); - } - - pkgmgrinfo_appinfo_destroy_appinfo (handle); - - return ise_changed; - } -#endif + LOGW ("Failed to launch IME (%s)", uuid.c_str ()); return false; } @@ -6590,7 +6505,7 @@ static void slot_run_helper (const String &uuid, const String &config, const Str String scim_helper_path; - delete_ise_check_pid_alive_timer (); + delete_ise_check_pid_alive_timer(); #ifdef HAVE_PKGMGR_INFO char *execpath = NULL; @@ -6612,7 +6527,7 @@ static void slot_run_helper (const String &uuid, const String &config, const Str return; } - LOGD ("exec path : %s %d", execpath, _ime_info.size ()); + LOGD ("exec path : %s", execpath); scim_helper_path = String (execpath); if (appinfo_handle) { @@ -7513,13 +7428,8 @@ static void launch_default_soft_keyboard (keynode_t *key, void* data) { SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; - String helper_uuid = _config->read (SCIM_CONFIG_DEFAULT_HELPER_ISE, String("")); - if (helper_uuid.length () > 0) { - /* Start default ISE */ - change_keyboard_mode (TOOLBAR_HELPER_MODE); - } else { - set_temporary_ise (_initial_ise_uuid); - } + /* Start default ISE */ + change_keyboard_mode (TOOLBAR_HELPER_MODE); } static String sanitize_string (const char *str, int maxlen = 32) @@ -7550,42 +7460,6 @@ static String sanitize_string (const char *str, int maxlen = 32) return ret; } -static Eina_Bool monitor_user_data_path_timer(void *data) -{ - const char *path = static_cast(data); - bool user_data_path_exists = ecore_file_exists (path); - bool user_data_path_is_dir = ecore_file_is_dir (path); - if (user_data_path_exists && user_data_path_is_dir) { - LOGW ("'%s' exists : %d, is_dir : %d", path, - (user_data_path_exists ? 1 : 0), (user_data_path_is_dir ? 1 : 0)); - - /* Flush config before reloading */ - scim_global_config_flush (); - scim_global_config_reload (); - - load_config (); - - /* Read all ime info from db */ - _ime_info.clear (); - isf_pkg_select_all_ime_info_db (_ime_info); - - bool launch = true; - if (_info_manager->get_current_toolbar_mode () != TOOLBAR_HELPER_MODE) { - launch = false; - } - if (_launch_ise_on_request) { - launch = false; - } - String default_ise_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), _initial_ise_uuid); - set_active_ise (default_ise_uuid, launch); - - g_monitor_user_data_path_timer = NULL; - return ECORE_CALLBACK_CANCEL; - } - - return ECORE_CALLBACK_RENEW; -} - int main (int argc, char *argv []) { struct tms tiks_buf; @@ -7605,10 +7479,6 @@ int main (int argc, char *argv []) String display_name = String (); char buf[256] = {0}; - String user_data_path = String (); - bool user_data_path_exists = false; - bool user_data_path_is_dir = false; - #ifdef HAVE_ECOREX Ecore_Event_Handler *xclient_message_handler = NULL; Ecore_Event_Handler *xwindow_property_handler = NULL; @@ -7841,17 +7711,8 @@ int main (int argc, char *argv []) #endif /* CANDIDATE */ /* Load ISF configuration */ - user_data_path = scim_get_user_data_dir (); - user_data_path_exists = ecore_file_exists (user_data_path.c_str ()); - user_data_path_is_dir = ecore_file_is_dir (user_data_path.c_str ()); - if (user_data_path_exists && user_data_path_is_dir) { - load_config (); - } else { - LOGW ("'%s' exists : %d, is_dir : %d", user_data_path.c_str (), - (user_data_path_exists ? 1 : 0), (user_data_path_is_dir ? 1 : 0)); - g_monitor_user_data_path_timer = ecore_timer_add (1.0, monitor_user_data_path_timer, user_data_path.c_str ()); - } - check_time("load_config"); + load_config (); + check_time ("load_config"); #ifdef HAVE_VCONF char *lang_str; @@ -7968,11 +7829,6 @@ int main (int argc, char *argv []) _config->flush (); ret = 0; - if (g_monitor_user_data_path_timer) { - ecore_timer_del (g_monitor_user_data_path_timer); - g_monitor_user_data_path_timer = NULL; - } - #ifdef HAVE_BLUETOOTH /* deinitialize the callback function of Bluetooth connection */ ret = bt_hid_host_deinitialize (); diff --git a/ism/src/isf_query_utility.cpp b/ism/src/isf_query_utility.cpp index 21780d9..7dcf859 100644 --- a/ism/src/isf_query_utility.cpp +++ b/ism/src/isf_query_utility.cpp @@ -227,11 +227,6 @@ static inline int _db_create_table(void) static inline int _db_init(void) { - if (!isf_db_check_path_available()) { - LOGE ("The db path is not available, returning"); - return -EIO; - } - struct stat stat; int ret = db_util_open(databaseInfo.pPath, &databaseInfo.pHandle, DB_UTIL_REGISTER_HOOK_METHOD); if (ret != SQLITE_OK) { @@ -1800,21 +1795,6 @@ EXAPI int isf_db_rollback_transaction(void) return (ret == EXIT_SUCCESS); } -/** - * @brief Check availability of the path that isf db file will be stored - * - * @return 1 if it is available, otherwise return 0. - */ -EXAPI int isf_db_check_path_available(void) -{ - const char *user_db_path = tzplatform_getenv(TZ_USER_DB); - if (access(user_db_path, F_OK) != 0) { - LOGW("access failed : %s, errno(%d) - %s", user_db_path, errno, strerror(errno)); - return 0; - } - return 1; -} - /* vi:ts=4:nowrap:ai:expandtab */ diff --git a/ism/src/isf_query_utility.h b/ism/src/isf_query_utility.h index 0fd94ee..04f1ffb 100644 --- a/ism/src/isf_query_utility.h +++ b/ism/src/isf_query_utility.h @@ -84,7 +84,6 @@ EXAPI int isf_db_is_in_transaction(void); EXAPI int isf_db_begin_transaction(void); EXAPI int isf_db_commit_transaction(void); EXAPI int isf_db_rollback_transaction(void); -EXAPI int isf_db_check_path_available(void); #endif /* __ISF_QUERY_UTILITY_H__ */ diff --git a/ism/src/scim_global_config.cpp b/ism/src/scim_global_config.cpp index df46017..55580ab 100644 --- a/ism/src/scim_global_config.cpp +++ b/ism/src/scim_global_config.cpp @@ -407,18 +407,6 @@ scim_global_config_reset (const String &key) } EXAPI bool -scim_global_config_reload () -{ - if (__config_repository.updated.size ()) - return false; - - // Reload all configuration. - __initialize_config (); - - return true; -} - -EXAPI bool scim_global_config_flush () { if (!__config_repository.initialized) diff --git a/ism/src/scim_global_config.h b/ism/src/scim_global_config.h index 657c356..698e51b 100644 --- a/ism/src/scim_global_config.h +++ b/ism/src/scim_global_config.h @@ -162,12 +162,6 @@ EXAPI void scim_global_config_write (const String &key, const std::vector EXAPI void scim_global_config_reset (const String &key); /** - * @brief Reload global config. - * @return true if success. - */ -EXAPI bool scim_global_config_reload (); - -/** * @brief Flush the updated global config into user global config file. * @return true if success. */ diff --git a/packaging/isf.spec b/packaging/isf.spec index 2b96583..db5275d 100644 --- a/packaging/isf.spec +++ b/packaging/isf.spec @@ -25,7 +25,6 @@ BuildRequires: pkgconfig(tts) %endif BuildRequires: pkgconfig(eina) BuildRequires: pkgconfig(ecore) -BuildRequires: pkgconfig(ecore-file) BuildRequires: pkgconfig(evas) BuildRequires: pkgconfig(edje) BuildRequires: pkgconfig(dlog)