fix versioning for notification
authorYoung Ik Cho <youngik.cho@samsung.com>
Fri, 11 Jan 2013 05:14:02 +0000 (14:14 +0900)
committerYoung Ik Cho <youngik.cho@samsung.com>
Fri, 11 Jan 2013 05:14:02 +0000 (14:14 +0900)
Change-Id: I2d44817c58a81aaa8aae7df1912079b81eeb36a4
Signed-off-by: Young Ik Cho <youngik.cho@samsung.com>
src/core/FShell_NotificationManagerImpl.cpp

index 58699ce..3721a41 100644 (file)
@@ -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)