summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorseungha.son <seungha.son@samsung.com>2016-11-24 13:47:31 +0900
committerseungha.son <seungha.son@samsung.com>2016-11-24 14:24:10 +0900
commitfb93e2b88ac44055ab8f55364e63a6ebc8f5fea8 (patch)
treedeed637826bd1d00cd79000e255b9beebacb0703 /src
parent1e26b4c12a36a09f64b7e9623d72ac7b3c9a8f37 (diff)
downloadnotification-fb93e2b88ac44055ab8f55364e63a6ebc8f5fea8.tar.gz
notification-fb93e2b88ac44055ab8f55364e63a6ebc8f5fea8.tar.bz2
notification-fb93e2b88ac44055ab8f55364e63a6ebc8f5fea8.zip
Signed-off-by: seungha.son <seungha.son@samsung.com> Change-Id: I1dac4303d876ec8fc47cfc6c21a59d87377d930b
Diffstat (limited to 'src')
-rw-r--r--src/notification_setting_service.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/notification_setting_service.c b/src/notification_setting_service.c
index 8fe0fc1..ebd6347 100644
--- a/src/notification_setting_service.c
+++ b/src/notification_setting_service.c
@@ -609,9 +609,11 @@ EXPORT_API int notification_get_dnd_and_allow_to_notify(const char *appid,
if (db == NULL)
return get_last_result();
- query_setting = sqlite3_mprintf("SELECT allow_to_notify, do_not_disturb_except "
- "FROM %s WHERE appid = %Q AND uid = %d",
- NOTIFICATION_SETTING_DB_TABLE, appid, uid);
+ query_setting = sqlite3_mprintf("SELECT allow_to_notify, do_not_disturb_except " \
+ "FROM %s WHERE appid = %Q AND (uid = %d OR uid = %d) " \
+ "ORDER BY uid DESC;",
+ NOTIFICATION_SETTING_DB_TABLE, appid,
+ uid, tzplatform_getuid(TZ_SYS_GLOBALAPP_USER));
if (query_setting == NULL) {
NOTIFICATION_ERR("fail to alloc query");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;