_AppWidgetContext::RequestUpdate(const String& argument)
{
AppWidgetManagerService* pMgrService = AppWidgetManagerService::GetInstance();
- SysTryReturnResult(NID_SHELL, pMgrService, E_SYSTEM, "[E_SYSTEM] Failed to get an instance of AppWidgetManagerService.");
+ SysTryReturnResult(NID_SHELL, pMgrService, E_SYSTEM, "Failed to get an instance of AppWidgetManagerService.");
result r = pMgrService->RequestUpdate(this, argument);
SysTryReturnResult(NID_SHELL, !IsFailed(r), r, "Failed to request update.");
result
_AppWidgetContext::SendPendingEvent(void)
{
- TryReturnResult(__pPendingEventList->GetCount() > 0 , "There is no pending event.");
+ GetAppContext()->SetWaitingStatus(false);
+ TryReturn(__pPendingEventList->GetCount() > 0, E_DATA_NOT_FOUND, "This context has no pending event. Please find next pending event context.");
PendingEvent* pEvent = null;
__pPendingEventList->GetAt(0, pEvent);
-
- if (pEvent == null)
- {
- SysLog(NID_SHELL, "SendPendingEvent by IPC [0 existed.]");
- GetAppContext()->SetWaitingStatus(false);
- return E_SYSTEM;
- }
- SysLog(NID_SHELL, "SendPendingEvent by IPC [%d existed.]", __pPendingEventList->GetCount());
+ SysTryReturnResult(NID_SHELL, pEvent != null, E_SYSTEM, "__pPendingEventList has (%d) items, but failed to GetAt(0)", __pPendingEventList->GetCount());
__pPendingEventList->RemoveAt(0);
+ SysLog(NID_SHELL, "(%d) Remains in __pPendingEventList.", __pPendingEventList->GetCount());
+
result r = _AppWidgetRequestHelper::SendIpcRequest(GetClientId(), pEvent->operation, pEvent->pArg);
- GetAppContext()->SetWaitingStatus(false);
delete pEvent;
SysTryReturnResult(NID_SHELL, !IsFailed(r), E_SYSTEM, "SendIpcRequest failed.");