summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInkyun Kil <inkyun.kil@samsung.com>2018-05-23 15:45:58 +0900
committerInkyun Kil <inkyun.kil@samsung.com>2018-05-24 15:28:27 +0900
commit2dca91bb787f984c47b986f369ac6123a44bc9cb (patch)
tree1bfa4f21ff4fb90c2cc2d0c2638207fe855947c4
parent0e07bffe8680babd69b1cdf8dde107cf29919e87 (diff)
downloadalarm-manager-2dca91bb787f984c47b986f369ac6123a44bc9cb.tar.gz
alarm-manager-2dca91bb787f984c47b986f369ac6123a44bc9cb.tar.bz2
alarm-manager-2dca91bb787f984c47b986f369ac6123a44bc9cb.zip
Adds alarm_expire_mode
Adds alarm_expire_mode to not turn on the LCD when an alarm has expired Related patch : https://review.tizen.org/gerrit/#/c/179875/ Change-Id: I808c3854915e7de368bae4dd184c4f3998336a9b Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
-rw-r--r--alarm-manager.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/alarm-manager.c b/alarm-manager.c
index f640ced..b44cb6c 100644
--- a/alarm-manager.c
+++ b/alarm-manager.c
@@ -1832,12 +1832,20 @@ static int __post_notification(guchar *data, int datalen, uid_t uid)
{
int ret;
notification_h noti;
+ int expire_mode = ALARM_EXPIRE_MODE_NORMAL;
noti = __get_notification(data, datalen);
if (noti == NULL)
return -1;
- device_display_change_state(DISPLAY_STATE_NORMAL);
+ if (vconf_get_int(VCONFKEY_ALARM_EXPIRE_MODE, &expire_mode) != 0)
+ ALARM_MGR_EXCEPTION_PRINT("Failed to get value of VCONFKEY_ALARM_EXPIRE_MODE");
+
+ ALARM_MGR_LOG_PRINT("Value of alarm_expire_mode [%d]", expire_mode);
+
+ if (expire_mode == ALARM_EXPIRE_MODE_NORMAL)
+ device_display_change_state(DISPLAY_STATE_NORMAL);
+
ret = notification_post_for_uid(noti, uid);
notification_free(noti);
@@ -1920,6 +1928,11 @@ static void __alarm_expired()
ALARM_MGR_EXCEPTION_PRINT("Unable to add alarm id to the bundle\n");
} else {
int result = 0;
+ int expire_mode = ALARM_EXPIRE_MODE_NORMAL;
+ if (vconf_get_int(VCONFKEY_ALARM_EXPIRE_MODE, &expire_mode) != 0)
+ ALARM_MGR_EXCEPTION_PRINT("Failed to get value of VCONFKEY_ALARM_EXPIRE_MODE");
+
+ ALARM_MGR_LOG_PRINT("Value of alarm_expire_mode [%d]", expire_mode);
if (__compare_api_version(&result, app_pid, __alarm_info->uid) < 0) {
ALARM_MGR_EXCEPTION_PRINT("Unable to check api version\n");
@@ -1954,7 +1967,8 @@ static void __alarm_expired()
ALARM_MGR_EXCEPTION_PRINT("Unable to launch app [%s] \n", appid);
} else {
ALARM_MGR_LOG_PRINT("Successfuly ran app svc\n");
- if (__is_ui_app(appid, __alarm_info->uid))
+ if (__is_ui_app(appid, __alarm_info->uid) &&
+ expire_mode == ALARM_EXPIRE_MODE_NORMAL)
device_display_change_state(DISPLAY_STATE_NORMAL);
}
}
@@ -4453,6 +4467,11 @@ static void __initialize()
g_type_init();
#endif
+ //For debug
+ int expire_mode = ALARM_EXPIRE_MODE_NORMAL;
+ vconf_get_int(VCONFKEY_ALARM_EXPIRE_MODE, &expire_mode);
+ ALARM_MGR_LOG_PRINT("alarm_expire_mode : %d", expire_mode);
+
__initialize_timer();
if (__initialize_dbus() == false) {
/* because dbus's initialize