From f1f235b259ecaece147328fdcd045226a821cdf2 Mon Sep 17 00:00:00 2001 From: Young Ik Cho Date: Fri, 11 Jan 2013 14:14:02 +0900 Subject: [PATCH] fix versioning for notification Change-Id: I2d44817c58a81aaa8aae7df1912079b81eeb36a4 Signed-off-by: Young Ik Cho --- src/core/FShell_NotificationManagerImpl.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/core/FShell_NotificationManagerImpl.cpp b/src/core/FShell_NotificationManagerImpl.cpp index 58699ce..3721a41 100644 --- a/src/core/FShell_NotificationManagerImpl.cpp +++ b/src/core/FShell_NotificationManagerImpl.cpp @@ -74,14 +74,6 @@ ConvertNotificationResult(int error) } } -static int -GetMessageLength() -{ - static int length = (_AppInfo::GetApiVersion() < _API_VERSION_2_1) ? 127 : MAX_NOTIFICATION_MESSAGE_LENGTH; - - return length; -} - bool IsPosted(ui_notification_h handle) { @@ -194,7 +186,7 @@ _NotificationManagerImpl::NotifyImpl(const String& messageText, int badgeNumber, if (!messageText.IsEmpty()) { SysTryReturnResult(NID_APP, - messageText.GetLength() <= GetMessageLength(), E_INVALID_ARG, + messageText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG, "MessageText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH."); if (isOngoing) @@ -278,7 +270,7 @@ _NotificationManagerImpl::NotifyImpl(const AppId& appId, const String& messageTe if (isOngoing || !messageText.IsEmpty()) { SysTryReturnResult(NID_APP, - messageText.GetLength() <= GetMessageLength(), E_INVALID_ARG, + messageText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG, "MessageText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH."); if (isOngoing) @@ -377,7 +369,7 @@ _NotificationManagerImpl::NotifyMessageImpl(const NotificationRequest& notiMessa if (isOngoing || !messageText.IsEmpty()) { SysTryReturnResult(NID_APP, - messageText.GetLength() <= GetMessageLength(), E_INVALID_ARG, + messageText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG, "MessageText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH."); if (isOngoing) -- 2.7.4