libscim@SCIM_EPOCH@_la_CXXFLAGS = @EVAS_CFLAGS@ \
@DLOG_CFLAGS@ \
@DB_UTIL_CFLAGS@ \
- @TZPLATFORM_CONFIG_CFLAGS@
+ @TZPLATFORM_CONFIG_CFLAGS@ \
+ @PKGMGR_INFO_CFLAGS@
libscim@SCIM_EPOCH@_la_LDFLAGS = -version-info $(SCIM_CURRENT):$(SCIM_REVISION):$(SCIM_AGE) \
-export-dynamic \
@DLOG_LIBS@ \
@DB_UTIL_LIBS@ \
@TZPLATFORM_CONFIG_LIBS@ \
+ @PKGMGR_INFO_LIBS@ \
-lstdc++
libscim@SCIM_EPOCH@_la_LIBADD = libltdlc.la
#include <dlog.h>
#include "isf_debug.h"
#include "isf_message_queue.h"
+#if HAVE_PKGMGR_INFO
+#include <pkgmgr-info.h>
+#endif // HAVE_PKGMGR_INFO
#ifdef LOG_TAG
# undef LOG_TAG
return;
}
- if (isf_db_select_ime_info_by_appid(uuid.c_str (), &imeInfo) < 1) {
- LOGW ("ime_info row is not available for %s", uuid.c_str ());
+#if HAVE_PKGMGR_INFO
+ int ret = 0;
+ char *pkgid = NULL;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(uuid.c_str(), &handle);
+ if (ret != PMINFO_R_OK) {
+ LOGW("Retrieve app info failed : %s", uuid.c_str ());
return;
}
+ ret = pkgmgrinfo_appinfo_get_pkgid(handle, &pkgid);
+ if (ret != PMINFO_R_OK) {
+ LOGW("Retrieve pkgid failed : %s, %p", uuid.c_str(), handle);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return;
+ }
+
+ imeInfo.module_name = pkgid;
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+#else
+ if (isf_db_select_ime_info_by_appid(uuid.c_str(), &imeInfo) < 1) {
+ LOGW("ime_info row is not available for %s", uuid.c_str());
+ return;
+ }
+#endif
+
engine_module = &m_impl->engine_module;
if (engine_module->valid() && imeInfo.module_name != engine_module->get_module_name()) {
}
if (!engine_module->valid()) {
-
if (engine_module->load (imeInfo.module_name, m_impl->m_config) == false) {
LOGW ("load module %s failed", imeInfo.module_name.c_str());
return;
ModuleExitFunc new_exit;
if (type.compare("Helper") == 0) {
- isf_db_select_module_path_by_mode(TOOLBAR_HELPER_MODE, mpath);
+ mpath.push_back(String(SCIM_MODULE_PATH) + String(SCIM_PATH_DELIM_STRING) + String(SCIM_BINARY_VERSION)
+ + String(SCIM_PATH_DELIM_STRING) + String("Helper"));
for (i = 0; i < mpath.size(); i++) {
module_path = mpath[i] + String (SCIM_PATH_DELIM_STRING) + name;
new_handle = lt_dlopenext (module_path.c_str ());
}
}
else if (type.compare("IMEngine") == 0 && name.compare("socket")) {
- isf_db_select_module_path_by_mode(TOOLBAR_KEYBOARD_MODE, mpath);
+ mpath.push_back(String(SCIM_MODULE_PATH) + String(SCIM_PATH_DELIM_STRING) + String(SCIM_BINARY_VERSION)
+ + String(SCIM_PATH_DELIM_STRING) + String("IMEngine"));
for (i = 0; i < mpath.size(); i++) {
module_path = mpath[i] + String (SCIM_PATH_DELIM_STRING) + name;
new_handle = lt_dlopenext (module_path.c_str ());