Fix: Exception occured on normal operations.
authorSeungWon Lee <lsw2000.lee@samsung.com>
Tue, 19 Feb 2013 07:19:34 +0000 (16:19 +0900)
committerSeungWon Lee <lsw2000.lee@samsung.com>
Tue, 19 Feb 2013 07:19:34 +0000 (16:19 +0900)
Change-Id: I639ff5be15fd7b09bc0dc5b40d9991cad844170d
Signed-off-by: SeungWon Lee <lsw2000.lee@samsung.com>
src/inc/FShell_NotificationManagerEventParamTraits.h

index fe32676..2a09d26 100644 (file)
@@ -96,16 +96,34 @@ struct ParamTraits<Tizen::Shell::NotificationRequest>
 
 
                Tizen::Shell::NotificationRequest notimessage;
-               notimessage.SetAlertText(alertText);
+               if (!alertText.IsEmpty())
+               {
+                       notimessage.SetAlertText(alertText);
+               }
                notimessage.SetAppMessage(appMessage);
                notimessage.SetTitleText(titleText);
-               notimessage.SetIconFilePath(iconFilePath);
-               notimessage.SetSoundFilePath(soundFilePath);
+               if (!iconFilePath.IsEmpty())
+               {
+                       notimessage.SetIconFilePath(iconFilePath);
+               }
+               if (!soundFilePath.IsEmpty())
+               {
+                       notimessage.SetSoundFilePath(soundFilePath);
+               }
 
-               notimessage.SetBadgeNumber(badgeNo);
-               notimessage.SetBadgeOffset(badgeOffset);
+               if (badgeNo >= 0)
+               {
+                       notimessage.SetBadgeNumber(badgeNo);
+               }
+               if (badgeOffset >= 0)
+               {
+                       notimessage.SetBadgeOffset(badgeOffset);
+               }
                notimessage.SetOngoingActivityType((Tizen::Shell::OngoingActivityType)activityType);
-               notimessage.SetOngoingActivityProgress(progressValue);
+               if (progressValue >= 0)
+               {
+                       notimessage.SetOngoingActivityProgress(progressValue);
+               }
 
 
                *r = notimessage;