From: seungha.son Date: Thu, 24 Nov 2016 04:47:31 +0000 (+0900) Subject: Add exception logic for installed app by globalapp X-Git-Tag: submit/tizen_3.0/20161124.053537^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb93e2b88ac44055ab8f55364e63a6ebc8f5fea8;p=platform%2Fcore%2Fapi%2Fnotification.git Add exception logic for installed app by globalapp Signed-off-by: seungha.son Change-Id: I1dac4303d876ec8fc47cfc6c21a59d87377d930b --- diff --git a/src/notification_setting_service.c b/src/notification_setting_service.c index 8fe0fc19..ebd63478 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;