summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseungha.son <seungha.son@samsung.com>2016-05-16 21:34:51 +0900
committerseungha.son <seungha.son@samsung.com>2016-05-17 09:55:53 +0900
commit16fb0526e3d5948af69026b8a5f791b6e45a0dde (patch)
tree40ae2979132f96b546dcd274541264d93205b373
parentdbf5a98402a8e34783fbe10e790488692a16c437 (diff)
downloadnotification-16fb0526e3d5948af69026b8a5f791b6e45a0dde.tar.gz
notification-16fb0526e3d5948af69026b8a5f791b6e45a0dde.tar.bz2
notification-16fb0526e3d5948af69026b8a5f791b6e45a0dde.zip
Add tzplatform_config.h file Signed-off-by: seungha.son <seungha.son@samsung.com> Change-Id: I74fc61700e84e87131f055a5b4e91895ed50f2c3
-rwxr-xr-xsrc/notification_setting.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/notification_setting.c b/src/notification_setting.c
index 0b34177..a90274f 100755
--- a/src/notification_setting.c
+++ b/src/notification_setting.c
@@ -21,6 +21,7 @@
#include <package_manager.h>
#include <pkgmgr-info.h>
#include <tizen_type.h>
+#include <tzplatform_config.h>
#include <notification.h>
#include <notification_db.h>
@@ -34,8 +35,6 @@
#define NOTIFICATION_PRIVILEGE "http://tizen.org/privilege/notification"
-
-
EXPORT_API int notification_setting_get_setting_array(notification_setting_h *setting_array, int *count)
{
int ret = NOTIFICATION_ERROR_NONE;
@@ -392,7 +391,6 @@ EXPORT_API int notification_setting_refresh_setting_table()
int sqlite3_ret = SQLITE_OK;
int pkgmgr_ret = PACKAGE_MANAGER_ERROR_NONE;
pkgmgrinfo_pkginfo_filter_h filter;
- uid_t current_uid;
sqlite3_ret = db_util_open(DBPATH, &db, 0);
@@ -418,9 +416,11 @@ EXPORT_API int notification_setting_refresh_setting_table()
goto out;
}
- current_uid = getuid();
-
- pkgmgr_ret = pkgmgrinfo_pkginfo_usr_filter_foreach_pkginfo(filter, foreach_package_info_callback, db, current_uid);
+ /*
+ * DEFAULT_UID is owner's uid(5001)
+ * currently this api do not support multi-user.
+ */
+ pkgmgr_ret = pkgmgrinfo_pkginfo_usr_filter_foreach_pkginfo(filter, foreach_package_info_callback, db, tzplatform_getuid(TZ_SYS_DEFAULT_USER));
if (pkgmgr_ret != PMINFO_R_OK) {
NOTIFICATION_ERR("pkgmgrinfo_pkginfo_usr_filter_foreach_pkginfo failed [%d]", pkgmgr_ret);
err = NOTIFICATION_ERROR_FROM_DB;