diff options
author | seungha.son <seungha.son@samsung.com> | 2016-11-24 13:47:31 +0900 |
---|---|---|
committer | seungha.son <seungha.son@samsung.com> | 2016-11-24 14:24:10 +0900 |
commit | fb93e2b88ac44055ab8f55364e63a6ebc8f5fea8 (patch) | |
tree | deed637826bd1d00cd79000e255b9beebacb0703 /src | |
parent | 1e26b4c12a36a09f64b7e9623d72ac7b3c9a8f37 (diff) | |
download | notification-fb93e2b88ac44055ab8f55364e63a6ebc8f5fea8.tar.gz notification-fb93e2b88ac44055ab8f55364e63a6ebc8f5fea8.tar.bz2 notification-fb93e2b88ac44055ab8f55364e63a6ebc8f5fea8.zip |
Add exception logic for installed app by globalappsubmit/tizen_3.0/20161124.053537accepted/tizen/3.0/wearable/20161125.075953accepted/tizen/3.0/tv/20161125.075910accepted/tizen/3.0/mobile/20161125.075848accepted/tizen/3.0/ivi/20161125.080006accepted/tizen/3.0/common/20161125.101443
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I1dac4303d876ec8fc47cfc6c21a59d87377d930b
Diffstat (limited to 'src')
-rw-r--r-- | src/notification_setting_service.c | 8 |
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; |