#include <FBaseSysLog.h>
#include <FApp.h>
-
#include <FShellNotificationManager.h>
#include <FShellNotificationRequest.h>
#include <FShellIBadgeEventListener.h>
// _NotificationManagerImpl
///////////////////////////////////////////////////////////////////
_NotificationManagerImpl::_NotificationManagerImpl(void)
- : __notifyPrivitId(-1)
- , __notifyPrivitIdForOngoing(-1)
+ : __notifyPrivateId(-1)
+ , __notifyPrivateIdForOngoing(-1)
{
}
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;
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
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
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:
SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
if (isOngoing)
{
- __notifyPrivitIdForOngoing = notiPrivateId;
+ __notifyPrivateIdForOngoing = notiPrivateId;
}
else
{
- __notifyPrivitId = notiPrivateId;
+ __notifyPrivateId = notiPrivateId;
}
}
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)
{
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)
{