Modify account plugin API Call according to installer backed user change 97/85397/2 accepted/tizen/common/20160831.161510 accepted/tizen/ivi/20160831.124444 accepted/tizen/mobile/20160831.124405 accepted/tizen/wearable/20160831.124428 submit/tizen/20160831.011341
authorjkjo92 <jkjo92@samsung.com>
Thu, 25 Aug 2016 02:36:07 +0000 (11:36 +0900)
committerJinkeun Jo <jkjo92@samsung.com>
Thu, 25 Aug 2016 02:37:25 +0000 (19:37 -0700)
Change-Id: If2e46aaab2920a636170fe70a26e66af17a0afa3
Signed-off-by: jkjo92 <jkjo92@samsung.com>
src/account.c

index d020158b519150fa5a5a4bee98cb2eb3b109ce45..8686de25ef51ece94ed3f956a0c1f706fe9435a2 100644 (file)
@@ -252,7 +252,12 @@ int _register_account_provider(xmlDocPtr docPtr, char* account_provider_app_id)
                                                                }
                                                                g_free(icon_path);
                                                        } else {
-                                                               ret = app_manager_get_shared_resource_path((char*)attribute_app_id, &resource_path);
+                                                               uid_t uid = -1;
+                                                               if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+                                                                       _E("pkgmgr_installer_info_get_target_uid() fail");
+                                                                       goto CATCH;
+                                                               }
+                                                               ret = aul_get_usr_app_shared_resource_path_by_appid((char*)attribute_app_id, &resource_path, uid);
                                                                if(ret != APP_MANAGER_ERROR_NONE) {
                                                                        _E("Failed to get the shared resource path. app_manager ret=[%d]", ret);
                                                                        goto CATCH;
@@ -311,7 +316,12 @@ int _register_account_provider(xmlDocPtr docPtr, char* account_provider_app_id)
                                                                }
                                                                g_free(small_icon_path);
                                                        } else {
-                                                               ret = app_manager_get_shared_resource_path((char*)attribute_app_id, &resource_path);
+                                                               uid_t uid = -1;
+                                                               if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+                                                                       _E("pkgmgr_installer_info_get_target_uid() fail");
+                                                                       goto CATCH;
+                                                               }
+                                                               ret = aul_get_usr_app_shared_resource_path_by_appid((char*)attribute_app_id, &resource_path, uid);
                                                                if(ret != APP_MANAGER_ERROR_NONE) {
                                                                        _E("Failed to get the shared resource path.");
                                                                        goto CATCH;