filter nodisplayed package 25/45325/1
authorSoohye Shin <soohye.shin@samsung.com>
Wed, 5 Aug 2015 02:29:06 +0000 (11:29 +0900)
committerSoohye Shin <soohye.shin@samsung.com>
Wed, 5 Aug 2015 02:29:06 +0000 (11:29 +0900)
Change-Id: I68d26729f4dba8ca599fbd36f7b1406cda7a7881
Signed-off-by: Soohye Shin <soohye.shin@samsung.com>
src/data/data_recent.c

index dc38493..a3cdb98 100644 (file)
@@ -67,6 +67,7 @@ static void _app_list_foreach(gpointer data, gpointer user_data)
        int r;
        struct datamgr_item *di;
        struct datamgr *dm;
+       bool nodisplay;
 
        if (!data) {
                _ERR("Invalid argument");
@@ -76,15 +77,18 @@ static void _app_list_foreach(gpointer data, gpointer user_data)
        rdata = data;
        dm = user_data;
 
-       if (!strcmp(rdata->id, PACKAGE))
-               return;
-
        r = pkgmgrinfo_appinfo_get_appinfo(rdata->id, &handle);
        if (r != PMINFO_R_OK) {
                _ERR("failed to get app info");
                return;
        }
 
+       r = pkgmgrinfo_appinfo_is_nodisplay(handle, &nodisplay);
+       if (r != PMINFO_R_OK || nodisplay) {
+               pkgmgrinfo_appinfo_destroy_appinfo(handle);
+               return;
+       }
+
        label = NULL;
        thumb = NULL;
        r = pkgmgrinfo_appinfo_get_label(handle, &label);