fix appcontrol result behavior from service callee
[platform/framework/native/appfw.git] / src / app / FApp_NotificationManagerImpl.cpp
index c88337a..7b8233c 100644 (file)
@@ -27,6 +27,7 @@
 #include <notification/notification.h>
 #include <appfw/app.h>
 #include <appfw/app_ui_notification.h>
+#include <appinfo.h>
 
 #include <FBaseSysLog.h>
 #include <FAppNotificationManager.h>
@@ -138,11 +139,7 @@ _NotificationManagerImpl::GetBadgeNumber(void) const
 {
        unsigned int count = 0;
 
-       const AppId appId = _AppInfo::GetApplicationId();
-
-       std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
-
-       badge_error_e badgeError = badge_get_count(pAppId.get(), &count);
+       badge_error_e badgeError = badge_get_count(appinfo_get_appid(), &count);
 
        if (badgeError == BADGE_ERROR_NONE)
        {
@@ -233,9 +230,7 @@ _NotificationManagerImpl::NotifyImpl(const String& messageText, int badgeNumber,
 
        if (badgeNumber >= 0)
        {
-               const AppId appId = _AppInfo::GetApplicationId();
-               std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
-               badge_error_e badgeError = badge_set_count(pAppId.get(), badgeNumber);
+               badge_error_e badgeError = badge_set_count(appinfo_get_appid(), badgeNumber);
                SysTryLog(NID_APP, badgeError == BADGE_ERROR_NONE, "badge_set_count failed(%d).", badgeError);
        }