}
#endif
+static int pkgmgr_get_appinfo (const char *appid, pkgmgrinfo_appinfo_h *handle)
+{
+ int ret = 0;
+ /* Try to get in global packages */
+ ret = pkgmgrinfo_appinfo_get_appinfo (appid, handle);
+ if (ret != PMINFO_R_OK) {
+ LOGW ("[pkgmgrinfo_appinfo_get_appinfo] appid : '%s', ret : %d\n", appid, ret);
+ /* Try to get in user packages */
+ ret = pkgmgrinfo_appinfo_get_usr_appinfo (appid, getuid (), handle);
+ if (ret != PMINFO_R_OK)
+ LOGW ("[pkgmgrinfo_appinfo_get_usr_appinfo] appid : '%s', ret : %d\n", appid, ret);
+ }
+
+ return ret;
+}
+
static void usb_keyboard_signal_cb (void *data, DBusMessage *msg)
{
DBusError err;
This may be necessary if IME packages are changed while panel process is terminated. */
pkgmgrinfo_appinfo_h handle = NULL;
/* Try to get in global packages */
- int ret = pkgmgrinfo_appinfo_get_appinfo (uuid.c_str (), &handle);
+ int ret = pkgmgr_get_appinfo (uuid.c_str (), &handle);
if (ret != PMINFO_R_OK) {
- /* Try to get in user packages */
- ret = pkgmgrinfo_appinfo_get_usr_appinfo (uuid.c_str (), getpid (), &handle);
- if (ret != PMINFO_R_OK) {
- LOGW ("appid \"%s\" is invalid.\n", uuid.c_str ());
- /* This might happen if IME is uninstalled while the panel process is inactive.
- The variable uuid would be invalid, so set_active_ise() would return false. */
- invalid = true;
- }
+ LOGW ("appid \"%s\" is invalid.\n", uuid.c_str ());
+ /* This might happen if IME is uninstalled while the panel process is inactive.
+ The variable uuid would be invalid, so set_active_ise() would return false. */
+ invalid = true;
}
if (handle)
/* get app info handle */
/* Try to get in global packages */
- ret = pkgmgrinfo_appinfo_get_appinfo (uuid.c_str (), &appinfo_handle);
+ ret = pkgmgr_get_appinfo (uuid.c_str (), &appinfo_handle);
if (ret != PMINFO_R_OK) {
- /* Try to get in user packages */
- ret = pkgmgrinfo_appinfo_get_usr_appinfo (uuid.c_str (), getpid (), &appinfo_handle);
-
- if (ret != PMINFO_R_OK) {
- LOGW ("pkgmgrinfo_appinfo_get_appinfo () & get_usr_appinfo () failed. appid : %s, ret : %d \n", uuid.c_str (), ret);
- return;
- }
+ LOGW ("pkgmgrinfo_appinfo_get_appinfo () & get_usr_appinfo () failed. appid : %s, ret : %d \n", uuid.c_str (), ret);
+ return;
}
/* Get exec path */
isf_load_ise_information(ALL_ISE, _config);
for (unsigned int i = 0; i < _ime_info.size (); i++) {
- /* Try to get in global packages */
- ret = pkgmgrinfo_appinfo_get_appinfo(_ime_info[i].appid.c_str(), &handle);
- if (ret != PMINFO_R_OK) {
- /* Try to get in user packages */
- ret = pkgmgrinfo_appinfo_get_usr_appinfo(_ime_info[i].appid.c_str(), getpid (), &handle);
- }
+ ret = pkgmgr_get_appinfo (_ime_info[i].appid.c_str(), &handle);
if (ret == PMINFO_R_OK) {
ret = pkgmgrinfo_appinfo_is_category_exist(handle, "http://tizen.org/category/ime", &exist);