Fix pkginfo tool 27/245227/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 5 Oct 2020 23:35:21 +0000 (08:35 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 5 Oct 2020 23:35:21 +0000 (08:35 +0900)
- Prints component-based application info

Change-Id: Ie71b5f278aa0a4b3095c1d89345bb1d823a0c514
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/pkginfo/pkg_info.c

index 42acf57..f7c3846 100644 (file)
@@ -1474,6 +1474,9 @@ int app_func(const pkgmgrinfo_appinfo_h handle, void *user_data)
                        printf("Autorestart: %d \n", autorestart);
        }
 
+       if (component == PMINFO_COMPONENT_BASED_APP)
+               printf("component: componentbasedapp\n");
+
        if (data)
                printf("user_data : %s\n\n", data);
 
@@ -1536,6 +1539,11 @@ static int __pkg_list_cb(const pkgmgrinfo_pkginfo_h handle, void *user_data)
                ret = pkgmgrinfo_appinfo_get_usr_list(handle, PMINFO_WATCH_APP, app_func, (void *)test_data, uid_info->uid);
                if (ret < 0)
                        printf("pkgmgr_get_info_app() failed\n");
+
+               printf("**List of Component-based-Apps**\n");
+               ret = pkgmgrinfo_appinfo_get_usr_list(handle, PMINFO_COMPONENT_BASED_APP, app_func, (void *)test_data, uid_info->uid);
+               if (ret < 0)
+                       printf("pkgmgr_get_info_app() failed\n");
        } else {
                printf("**List of Ui-Apps**\n");
                ret = pkgmgrinfo_appinfo_get_list(handle, PMINFO_UI_APP, app_func, (void *)test_data);
@@ -1556,6 +1564,11 @@ static int __pkg_list_cb(const pkgmgrinfo_pkginfo_h handle, void *user_data)
                ret = pkgmgrinfo_appinfo_get_list(handle, PMINFO_WATCH_APP, app_func, (void *)test_data);
                if (ret < 0)
                        printf("pkgmgr_get_info_app() failed\n");
+
+               printf("**List of Component-based-Apps**\n");
+               ret = pkgmgrinfo_appinfo_get_list(handle, PMINFO_COMPONENT_BASED_APP, app_func, (void *)test_data);
+               if (ret < 0)
+                       printf("pkgmgr_get_info_app() failed\n");
        }
        printf("---------------------------------------\n");