Added new method to the NotificationManager Interface
[platform/framework/native/appfw.git] / src / app / FApp_NotificationManagerImpl.cpp
index d4579be..cbd7a03 100644 (file)
@@ -83,7 +83,13 @@ _NotificationManagerImpl::GetBadgeNumber(void) const
 {
        SysTryReturn(NID_APP, __pNotiImpl != null, -1, E_SYSTEM, "[E_SYSTEM] Notification interface error.");
 
-       return __pNotiImpl->GetBadgeNumber();
+       int res = __pNotiImpl->GetBadgeNumber();
+       if (GetLastResult() == E_OPERATION_FAILED)
+       {
+               SetLastResult(E_SUCCESS);
+               return -1;
+       }
+       return res;
 }
 
 
@@ -145,6 +151,11 @@ _NotificationManagerImpl::GetBadgeNumber(const AppId& appId) const
                SetLastResult(E_OBJ_NOT_FOUND);
        }
 
+       if (GetLastResult() == E_OPERATION_FAILED)
+       {
+               SetLastResult(E_SUCCESS);
+               return -1;
+       }
        return ret;
 }
 
@@ -211,7 +222,7 @@ _NotificationManagerImpl::NotifyOngoingActivity(const String& messageText) const
 {
        SysTryReturnResult(NID_APP, __pNotiImpl != null, E_SYSTEM, "Notification interface error.");
 
-       return __pNotiImpl->NotifyOngoingActivity(messageText, String(L""));
+       return __pNotiImpl->NotifyOngoingActivity(messageText);
 }