Add exception logic for installed app by globalapp 55/99755/4 accepted/tizen/3.0/common/20161125.101443 accepted/tizen/3.0/ivi/20161125.080006 accepted/tizen/3.0/mobile/20161125.075848 accepted/tizen/3.0/tv/20161125.075910 accepted/tizen/3.0/wearable/20161125.075953 submit/tizen_3.0/20161124.053537
authorseungha.son <seungha.son@samsung.com>
Thu, 24 Nov 2016 04:47:31 +0000 (13:47 +0900)
committerseungha.son <seungha.son@samsung.com>
Thu, 24 Nov 2016 05:24:10 +0000 (14:24 +0900)
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I1dac4303d876ec8fc47cfc6c21a59d87377d930b

src/notification_setting_service.c

index 8fe0fc1..ebd6347 100644 (file)
@@ -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;