Fixed the uts-app failed testcases
authorJiban Prakash <p.jiban@samsung.com>
Fri, 1 Nov 2013 09:37:20 +0000 (18:37 +0900)
committerJiban Prakash <p.jiban@samsung.com>
Fri, 1 Nov 2013 09:37:20 +0000 (18:37 +0900)
Change-Id: I6853538bfb7690214b32352fe0599576a615d5f3
Signed-off-by: Jiban Prakash <p.jiban@samsung.com>
src/app/FApp_NotificationManagerImpl.cpp

index b9db124..d4579be 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "FApp_NotificationManagerImpl.h"
 #include "FApp_INotificationManagerImpl.h"
+#include "FAppNotificationManager.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Runtime;
@@ -184,6 +185,8 @@ result
 _NotificationManagerImpl::NotifyOnBehalf(const AppId& appId, const String& messageText, const String& launchArguments) const
 {
        SysTryReturnResult(NID_APP, __pNotiImpl != null, E_SYSTEM, "Notification interface error.");
+       SysTryReturnResult(NID_APP, launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
+                                                  "launchArguments is greater than MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.");
 
        return __pNotiImpl->NotifyByAppId(appId, messageText, -1, launchArguments);
 }
@@ -196,6 +199,9 @@ _NotificationManagerImpl::NotifyOnBehalf(const AppId& appId, const String& messa
        SysTryReturnResult(NID_APP, __pNotiImpl != null, E_SYSTEM, "Notification interface error.");
        SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
 
+       SysTryReturnResult(NID_APP, launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
+                                                  "launchArguments is greater than MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.");
+
        return __pNotiImpl->NotifyByAppId(appId, messageText, badgeNumber, launchArguments);
 }
 
@@ -213,6 +219,8 @@ result
 _NotificationManagerImpl::NotifyOngoingActivity(const String& messageText, const String& launchArguments) const
 {
        SysTryReturnResult(NID_APP, __pNotiImpl != null, E_SYSTEM, "Notification interface error.");
+       SysTryReturnResult(NID_APP, launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
+                                                  "launchArguments is greater than MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.");
 
        return __pNotiImpl->NotifyOngoingActivity(messageText, launchArguments);
 }