if (service_to_bundle(hSvc, &service_data) == SERVICE_ERROR_NONE)
{
- notification_set_property(notiHandle, 0);
- notification_set_execute_option(notiHandle, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, service_data);
+ r = ConvertNotificationResult(notification_set_property(notiHandle, 0));
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_property failed.", GetErrorMessage(r));
+ r = ConvertNotificationResult(notification_set_execute_option(notiHandle, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,
+ NULL, NULL, service_data));
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] Nnotification_set_execute_option failed.", GetErrorMessage(r));
+ SysLog(NID_APP, "notification_set_execute_option");
}
else
{
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.));
+ r = ConvertNotificationResult(notification_set_size(notiHandle, 0)); // Reset for override BYTE type
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
}
- else
- {
- r = ConvertNotificationResult(notification_set_progress(notiHandle, progress/100.));
- }
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification update failure.", GetErrorMessage(r));
+ r = ConvertNotificationResult(notification_set_progress(notiHandle, progress/100.));
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_progress failure.", GetErrorMessage(r));
break;
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));
+ r = ConvertNotificationResult(notification_set_progress(notiHandle, 0.0)); // Reset for override PERCENTAGE type
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_progress failure.", GetErrorMessage(r));
}
- else
- {
- r = ConvertNotificationResult(notification_set_size(notiHandle, progress));
- }
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification update failure.", GetErrorMessage(r));
+ r = ConvertNotificationResult(notification_set_size(notiHandle, progress));
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
break;
case ONGOING_ACTIVITY_TYPE_TEXT:
- ConvertNotificationResult(notification_update_progress(notiHandle, notiPrivateId, 0.0)); // Reset the progress
- ConvertNotificationResult(notification_update_size(notiHandle, notiPrivateId, 0));
+ r = ConvertNotificationResult(notification_set_progress(notiHandle, 0.0)); // Reset the progress
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
+ r = ConvertNotificationResult(notification_set_size(notiHandle, 0));
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
break;
default:
r = E_OPERATION_FAILED;
break;
}
- if (needUpdate)
- {
- r = ConvertNotificationResult(notification_update_content(notiHandle, notiPrivateId, pMsg.get()));
- }
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification update failure.", GetErrorMessage(r));
}
// insert for new notification
__notifyPrivateId = notiPrivateId;
}
}
-
- // notification_update just for non ongoing and text type ongoing only.
- if (needUpdate && !isOngoing)
+ else
{
- notification_update(notiHandle);
- SysLog(NID_APP, "Notification update from notiPrivateId(%d)", notiPrivateId);
+ int previousDisplaySet = NOTIFICATION_DISPLAY_APP_ALL;
+ if (isOngoing)
+ {
+ r = ConvertNotificationResult(notification_get_display_applist(notiHandle, &previousDisplaySet));
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_display_applist failure.", GetErrorMessage(r));
+ int newDisplaySet = previousDisplaySet & ~NOTIFICATION_DISPLAY_APP_TICKER;
+ r = ConvertNotificationResult(notification_set_display_applist(notiHandle, newDisplaySet));
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_display_applist failure.", GetErrorMessage(r));
+ }
+
+ r = ConvertNotificationResult(notification_update(notiHandle));
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_update failure. notiPrivateId(%d)", GetErrorMessage(r), notiPrivateId);
+
+ if (isOngoing)
+ {
+ r = ConvertNotificationResult(notification_set_display_applist(notiHandle, previousDisplaySet));
+ SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_display_applist failure.", GetErrorMessage(r));
+ }
}