#include <FBaseSysLog.h>
#include <FIoFile.h>
#include <FAppApp.h>
+#include <FGrpColor.h>
#include <FShellNotificationManager.h>
#include <FShellNotificationRequest.h>
#include <FShellIBadgeEventListener.h>
using namespace Tizen::Base::Collection;
using namespace Tizen::App;
using namespace Tizen::Io;
+using namespace Tizen::Graphics;
extern "C" int service_create_request(bundle *data, service_h *service);
extern "C" int service_to_bundle(service_h service, bundle** data);
: __notifyPrivateId(-1)
, __notifyPrivateIdForOngoing(-1)
, __lastNotifyPrivateId(-1)
+ , __lightActivated(false)
{
}
}
}
+ // light
+ Color lightColor;
+ int lightColor32 = 0;
+
// Set - service
int retVal = SERVICE_ERROR_NONE;
int previousDisplaySet = NOTIFICATION_DISPLAY_APP_ALL;
SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the notification area failed.", GetErrorMessage(r));
}
+ // Set LED
+ lightColor = pRequestImpl->GetColor();
+ lightColor32 = lightColor.GetRGB32();
+
+ if (lightColor32 == 0 || (pRequestImpl->GetOnTime() == 0))
+ { // Turn off case
+ if (needUpdate && __lightActivated)
+ { // Not for first insertion
+ r = ConvertNotificationResult(notification_set_led(notiHandle, NOTIFICATION_LED_OP_OFF, 0x00000000));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the notification led failed.", GetErrorMessage(r));
+ __lightActivated = false;
+ }
+ }
+ else
+ {
+ r = ConvertNotificationResult(notification_set_led(notiHandle, NOTIFICATION_LED_OP_ON_CUSTOM_COLOR, lightColor32));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the notification led failed.", GetErrorMessage(r));
+
+ r = ConvertNotificationResult(notification_set_led_time_period(notiHandle, pRequestImpl->GetOnTime(), pRequestImpl->GetOffTime()));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the notification led time period failed.", GetErrorMessage(r));
+ __lightActivated = true;
+ }
+
// insert for new notification
if (!needUpdate)
{ // new
if (notiPrivateId != -1)
{
- notification_h notiHandle = notification_load(null, notiPrivateId);
+ std::unique_ptr<char[]> pAppIdTemp(_StringConverter::CopyToCharArrayN(__lastAppId));
+ notification_h notiHandle = notification_load(pAppIdTemp.get(), notiPrivateId);
if (notiHandle)
{
err = notification_delete(notiHandle);