Rename variable names.
authorSeungWon Lee <lsw2000.lee@samsung.com>
Thu, 14 Mar 2013 07:33:34 +0000 (16:33 +0900)
committerSeungWon Lee <lsw2000.lee@samsung.com>
Thu, 14 Mar 2013 07:33:34 +0000 (16:33 +0900)
Change-Id: I6307f4caa98d6668841f04a41461e2efe0cd5964
Signed-off-by: SeungWon Lee <lsw2000.lee@samsung.com>
src/core/FShell_NotificationManagerImpl.cpp
src/inc/FShell_NotificationManagerImpl.h

index 73dde17..e1d6367 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <FBaseSysLog.h>
 #include <FApp.h>
-
 #include <FShellNotificationManager.h>
 #include <FShellNotificationRequest.h>
 #include <FShellIBadgeEventListener.h>
@@ -191,8 +190,8 @@ _BadgeManagerImpl::RemovePrimaryBadgeEventListener(IBadgeEventListener& primaryL
 // _NotificationManagerImpl
 ///////////////////////////////////////////////////////////////////
 _NotificationManagerImpl::_NotificationManagerImpl(void)
-       : __notifyPrivitId(-1)
-       , __notifyPrivitIdForOngoing(-1)
+       : __notifyPrivateId(-1)
+       , __notifyPrivateIdForOngoing(-1)
 {
 }
 
@@ -516,7 +515,7 @@ _NotificationManagerImpl::NotifyMessage(_NotifyType notifyType, bool isOngoing,
        const String& iconPath = notifyRequest.GetIconFilePath();
        const String& soundPath = notifyRequest.GetSoundFilePath();
        const notification_type_e notiType = isOngoing ? NOTIFICATION_TYPE_ONGOING : NOTIFICATION_TYPE_NOTI;
-       int notiPrivateId = isOngoing ? __notifyPrivitIdForOngoing : __notifyPrivitId;
+       int notiPrivateId = isOngoing ? __notifyPrivateIdForOngoing : __notifyPrivateId;
        notification_h notiHandle = null;
        bundle* pBundle = null;
        bool needUpdate = false;
@@ -864,6 +863,7 @@ _NotificationManagerImpl::NotifyMessage(_NotifyType notifyType, bool isOngoing,
                case ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE:
                        if (needUpdate)
                        {
+                               ConvertNotificationResult(notification_update_size(notiHandle, notiPrivateId, 0));      // Reset for override BYTE type
                                r = ConvertNotificationResult(notification_update_progress(notiHandle, notiPrivateId, progress/100.));
                        }
                        else
@@ -876,6 +876,7 @@ _NotificationManagerImpl::NotifyMessage(_NotifyType notifyType, bool isOngoing,
                case ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE:
                        if (needUpdate)
                        {
+                               ConvertNotificationResult(notification_update_progress(notiHandle, notiPrivateId, 0.0));        // Reset for override PERCENTAGE type
                                r = ConvertNotificationResult(notification_update_size(notiHandle, notiPrivateId, progress));
                        }
                        else
@@ -886,7 +887,8 @@ _NotificationManagerImpl::NotifyMessage(_NotifyType notifyType, bool isOngoing,
                        break;
 
                case ONGOING_ACTIVITY_TYPE_TEXT:
-                       // Do nothing
+                       ConvertNotificationResult(notification_update_progress(notiHandle, notiPrivateId, 0.0));        // Reset the progress
+                       ConvertNotificationResult(notification_update_size(notiHandle, notiPrivateId, 0));
                        break;
 
                default:
@@ -908,11 +910,11 @@ _NotificationManagerImpl::NotifyMessage(_NotifyType notifyType, bool isOngoing,
                SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
                if (isOngoing)
                {
-                       __notifyPrivitIdForOngoing  = notiPrivateId;
+                       __notifyPrivateIdForOngoing  = notiPrivateId;
                }
                else
                {
-                       __notifyPrivitId = notiPrivateId;
+                       __notifyPrivateId = notiPrivateId;
                }
        }
 
@@ -948,7 +950,7 @@ _NotificationManagerImpl::RemoveNotification(bool onGoing)
        result r = E_SUCCESS;
        notification_error_e err = NOTIFICATION_ERROR_NONE;
        const notification_type_e notiType = onGoing ? NOTIFICATION_TYPE_ONGOING : NOTIFICATION_TYPE_NOTI;
-       const int notiPrivateId = onGoing ? __notifyPrivitIdForOngoing : __notifyPrivitId;
+       const int notiPrivateId = onGoing ? __notifyPrivateIdForOngoing : __notifyPrivateId;
 
        if (notiPrivateId != -1)
        {
@@ -998,7 +1000,7 @@ _NotificationManagerImpl::RemoveNotificationByAppId(const Tizen::App::AppId& app
 
        std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
        const notification_type_e notiType = onGoing ? NOTIFICATION_TYPE_ONGOING : NOTIFICATION_TYPE_NOTI;
-       const int notiPrivateId = onGoing ? __notifyPrivitIdForOngoing : __notifyPrivitId;
+       const int notiPrivateId = onGoing ? __notifyPrivateIdForOngoing : __notifyPrivateId;
 
        if (notiPrivateId != -1)
        {
index f2ea3bc..fd95334 100644 (file)
@@ -493,8 +493,8 @@ private:
        int GetBadgeCount(const char* pkgName) const;
 
 private:
-       int __notifyPrivitId;
-       int __notifyPrivitIdForOngoing;
+       int __notifyPrivateId;
+       int __notifyPrivateIdForOngoing;
        Tizen::Base::Collection::LinkedListT<IBadgeEventListener*> __badgeEventListenerList;
 };     //_NotificationManagerImpl