From: Young Ik Cho Date: Mon, 28 Oct 2013 03:11:05 +0000 (+0900) Subject: fix legacy noti tc failure X-Git-Tag: submit/tizen/20131210.080830^2^2~14 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fframework%2Fnative%2Fappfw.git;a=commitdiff_plain;h=decab303cd025f52430765efd8567d17673a76b4 fix legacy noti tc failure Change-Id: I1ea61120edd3485e7b8790cfb199b6f7b0362d66 Signed-off-by: Young Ik Cho --- diff --git a/src/app/FApp_NotificationManagerImpl.cpp b/src/app/FApp_NotificationManagerImpl.cpp index a3b2224..b9db124 100644 --- a/src/app/FApp_NotificationManagerImpl.cpp +++ b/src/app/FApp_NotificationManagerImpl.cpp @@ -90,6 +90,7 @@ result _NotificationManagerImpl::Notify(int badgeNumber) const { SysTryReturnResult(NID_APP, __pNotiImpl != null, E_SYSTEM, "Notification interface error."); + SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "badgeNumber is less than 0."); String messageText = String(L""); String appMessage = String(L""); @@ -113,6 +114,7 @@ result _NotificationManagerImpl::Notify(const String& messageText, int badgeNumber) const { SysTryReturnResult(NID_APP, __pNotiImpl != null, E_SYSTEM, "Notification interface error."); + SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "badgeNumber is less than 0."); String appMessage = String(L""); @@ -124,6 +126,7 @@ result _NotificationManagerImpl::Notify(const String& messageText, int badgeNumber, const String& launchArguments) const { SysTryReturnResult(NID_APP, __pNotiImpl != null, E_SYSTEM, "Notification interface error."); + SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "badgeNumber is less than 0."); return __pNotiImpl->Notify(messageText, badgeNumber, launchArguments); } @@ -133,7 +136,15 @@ _NotificationManagerImpl::GetBadgeNumber(const AppId& appId) const { SysTryReturn(NID_APP, __pNotiImpl != null, -1, E_SYSTEM, "[E_SYSTEM] Notification interface error."); - return __pNotiImpl->GetBadgeNumber(appId); + + const int ret = __pNotiImpl->GetBadgeNumber(appId); + result r = GetLastResult(); + if (r == E_APP_NOT_INSTALLED) + { + SetLastResult(E_OBJ_NOT_FOUND); + } + + return ret; } @@ -211,6 +222,7 @@ result _NotificationManagerImpl::NotifyOngoingActivityOnBehalf(const AppId& appId, const String& messageText) const { SysTryReturnResult(NID_APP, __pNotiImpl != null, E_SYSTEM, "Notification interface error."); + SysTryReturnResult(NID_APP, !messageText.IsEmpty(), E_INVALID_ARG, "MessageText is less than 0."); return __pNotiImpl->NotifyOngoingActivityByAppId(appId, messageText, String(L"")); } @@ -221,6 +233,7 @@ _NotificationManagerImpl::NotifyOngoingActivityOnBehalf(const AppId& appId, cons const String& launchArguments) const { SysTryReturnResult(NID_APP, __pNotiImpl != null, E_SYSTEM, "Notification interface error."); + SysTryReturnResult(NID_APP, !messageText.IsEmpty(), E_INVALID_ARG, "MessageText is less than 0."); return __pNotiImpl->NotifyOngoingActivityByAppId(appId, messageText, launchArguments); }