From 3ed9e1b0c702647aa09ed63b826cb54d989a5bc2 Mon Sep 17 00:00:00 2001 From: Szymon Jastrzebski Date: Tue, 28 Feb 2017 08:25:49 +0100 Subject: [PATCH] [Notification] Notification.progressValue should be set to null when is not defined by user Below comparision should always be true. tizen.notification.post(noti); tizen.notification.get(id).progressValue === noti.progressValue // true [Verification] Notification TCT tests passed 100% Change-Id: Ia53a25eaf5aee110e4fe3128d18e87fdaa2deb9f Signed-off-by: Szymon Jastrzebski --- src/notification/status_notification.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/notification/status_notification.cc b/src/notification/status_notification.cc index 13fe62c4..1b55a50c 100644 --- a/src/notification/status_notification.cc +++ b/src/notification/status_notification.cc @@ -1314,14 +1314,19 @@ PlatformResult StatusNotification::FromJson(const picojson::object& args, return status; } + double progressValue; if (val.contains("progressValue") && !IsNull(noti_obj, "progressValue")) { - double progressValue = common::FromJson(noti_obj, "progressValue"); - status = SetProgressValue(noti_handle, progress_type, progressValue, - is_update); + progressValue = common::FromJson(noti_obj, "progressValue"); + } + else { + progressValue = -1; + } - if (status.IsError()) { - return status; - } + status = SetProgressValue(noti_handle, progress_type, progressValue, + is_update); + + if (status.IsError()) { + return status; } status = SetText(noti_handle, -- 2.34.1