Add res control's res type filter 47/322947/1 tizen
authorIlho Kim <ilho159.kim@samsung.com>
Thu, 17 Apr 2025 12:54:34 +0000 (21:54 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Thu, 17 Apr 2025 12:54:34 +0000 (21:54 +0900)
Change-Id: Ifbb0ba875f2c1587698616c0ebf4b0962694ccce
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/pkginfo/pkg_info.c

index dc653ef340a58d19221cb76dcafcd35f88b3802d..417f776d07a49c40fcb69dc7fa1daac893eceafb 100644 (file)
@@ -391,6 +391,7 @@ static int __add_app_filter(uid_t uid)
                printf("18 --> filter by app ui-gadget [0|1]\n");
                printf("19 --> filter by app support disable [0|1]\n");
                printf("20 --> filter by app installed storage\n");
+               printf("21 --> filter by app res type of res control\n");
                choice = __get_integer_input_data();
                switch (choice) {
                case 0:
@@ -627,6 +628,18 @@ static int __add_app_filter(uid_t uid)
                        free(value);
                        value = NULL;
                        break;
+               case 21:
+                       value = __get_string_input_data();
+                       ret = pkgmgrinfo_appinfo_filter_add_string(handle,
+                                       PMINFO_APPINFO_PROP_RES_CONTROL_RES_TYPE, value);
+                       if (ret < 0) {
+                               printf("pkgmgrinfo_appinfo_filter_add_string() failed\n");
+                               ret = -1;
+                               goto err;
+                       }
+                       free(value);
+                       value = NULL;
+                       break;
 
                default:
                        printf("Invalid filter property\n");