Change-Id: I4e4a429e3e1673636f9b12ef86976e55a505467d
Signed-off-by: jungmin76.park <jungmin76.park@samsung.com>
static int OnAppWidgetUpdate(struct event_arg *arg, void* data);
static int OnAppWidgetPopupCreate(struct event_arg *arg, void* data);
static int OnAppWidgetPopupDestroy(struct event_arg *arg, void* data);
static int OnAppWidgetUpdate(struct event_arg *arg, void* data);
static int OnAppWidgetPopupCreate(struct event_arg *arg, void* data);
static int OnAppWidgetPopupDestroy(struct event_arg *arg, void* data);
- static int OnAppWidgetPause(struct event_arg *arg, void* data);
- static int OnAppWidgetResume(struct event_arg *pArg, void* pData);
- static int OnAppWidgetPauseAll(struct event_arg *arg, void* data);
- static int OnAppWidgetResumeAll(struct event_arg *pArg, void* pData);
+ static int OnAppWidgetBackground(struct event_arg *arg, void* data);
+ static int OnAppWidgetForeground(struct event_arg *pArg, void* pData);
+ static int OnAppWidgetBackgroundAll(struct event_arg *arg, void* data);
+ static int OnAppWidgetForegroundAll(struct event_arg *pArg, void* pData);
static int OnAppWidgetClick(struct event_arg *arg, void* data);
static int OnAppWidgetResize(struct event_arg *arg, void* data);
static int OnAppWidgetPeriodChanged(struct event_arg *arg, void* data);
static int OnAppWidgetClick(struct event_arg *arg, void* data);
static int OnAppWidgetResize(struct event_arg *arg, void* data);
static int OnAppWidgetPeriodChanged(struct event_arg *arg, void* data);
AppWidgetManagerService* pMgrService = AppWidgetManagerService::GetInstance();
SysTryReturnVoidResult(NID_SHELL, pMgrService, E_SYSTEM, "[E_SYSTEM] Failed to get an instance of AppWidgetManagerService.");
AppWidgetManagerService* pMgrService = AppWidgetManagerService::GetInstance();
SysTryReturnVoidResult(NID_SHELL, pMgrService, E_SYSTEM, "[E_SYSTEM] Failed to get an instance of AppWidgetManagerService.");
- // Queueing the pointer of paused context.
+ // Queueing the pointer of background context.
if (!this->IsForeground())
{
// Saving the data
if (!this->IsForeground())
{
// Saving the data
}
__hasPendingRequest = true;
}
__hasPendingRequest = true;
- SysLog(NID_SHELL, "Update is requested but the %ls is paused.", (this->GetAppId()).GetPointer());
+ SysLog(NID_SHELL, "Update is requested but the %ls is background.", (this->GetAppId()).GetPointer());
- SysLog(NID_SHELL, "%ls is already resumed.", (this->GetAppId()).GetPointer());
+ SysLog(NID_SHELL, "%ls is already foreground.", (this->GetAppId()).GetPointer());
- SysLog(NID_SHELL, "%ls is already paused.", (this->GetAppId()).GetPointer());
+ SysLog(NID_SHELL, "%ls is already background.", (this->GetAppId()).GetPointer());
return;
}
SetForeground(false);
return;
}
SetForeground(false);
result
_AppWidgetContext::SendPendingEvent(void)
{
result
_AppWidgetContext::SendPendingEvent(void)
{
- SysTryReturnResult(NID_SHELL, __pPendingEventList->GetCount() > 0 , E_DATA_NOT_FOUND, "There is no pending event.");
+ TryReturnResult(__pPendingEventList->GetCount() > 0 , "There is no pending event.");
PendingEvent* pEvent = null;
__pPendingEventList->GetAt(0, pEvent);
PendingEvent* pEvent = null;
__pPendingEventList->GetAt(0, pEvent);
void
_AppWidgetContext::OnDisconnected(void)
{
void
_AppWidgetContext::OnDisconnected(void)
{
+ SysSecureLog(NID_SHELL, "%ls, %ls", GetInstanceId().GetPointer(), GetProviderId().GetPointer());
+
__isTouchAvailable = false;
if (GetAppWidgetPopup())
{
__isTouchAvailable = false;
if (GetAppWidgetPopup())
{
- SysLog(NID_SHELL, "[%s] Failed to invoke LaunchPkg(%s), %dth retry.", GetErrorMessage(r), pOperation.get(), retry);
+ SysLogException(NID_SHELL, r, "[%s] Failed to invoke LaunchPkg(%s), %dth retry.", GetErrorMessage(r), pOperation.get(), retry);
Tizen::Base::Runtime::Thread::Sleep(TRY_SLEEP_TIME);
}
Tizen::Base::Runtime::Thread::Sleep(TRY_SLEEP_TIME);
}
{
pAppWidgetContextEnum->GetValue(pContext);
{
pAppWidgetContextEnum->GetValue(pContext);
- SysSecureLog(NID_SHELL, "%ls, %ls, %ls", pContext->GetInstanceId().GetPointer(), pContext->GetProviderId().GetPointer(), appId.GetPointer());
-
if (pContext->GetAppId() == appId)
{
if (pContext->GetAppId() == appId)
{
- SysLog(NID_SHELL, "client(%d) is unregistered.", clientId);
pContext->OnDisconnected();
}
}
pContext->OnDisconnected();
}
}
-AppWidgetManagerService::OnAppWidgetPause(struct event_arg *arg, void* data)
+AppWidgetManagerService::OnAppWidgetBackground(struct event_arg *arg, void* data)
{
SysTryReturn(NID_SHELL, arg, 0, E_SUCCESS, "arg is null!");
{
SysTryReturn(NID_SHELL, arg, 0, E_SUCCESS, "arg is null!");
-AppWidgetManagerService::OnAppWidgetPauseAll(struct event_arg *arg, void* data)
+AppWidgetManagerService::OnAppWidgetBackgroundAll(struct event_arg *arg, void* data)
{
unique_ptr< IMapEnumeratorT<String, _AppWidgetContext*> > pAppWidgetContextEnum((AppWidgetManagerService::GetInstance()->__appWidgetContextList).GetMapEnumeratorN());
SysTryReturn(NID_SHELL, pAppWidgetContextEnum, -1, E_SYSTEM, "[E_SYSTEM]");
{
unique_ptr< IMapEnumeratorT<String, _AppWidgetContext*> > pAppWidgetContextEnum((AppWidgetManagerService::GetInstance()->__appWidgetContextList).GetMapEnumeratorN());
SysTryReturn(NID_SHELL, pAppWidgetContextEnum, -1, E_SYSTEM, "[E_SYSTEM]");
-AppWidgetManagerService::OnAppWidgetResume(struct event_arg *pArg, void* pData)
+AppWidgetManagerService::OnAppWidgetForeground(struct event_arg *pArg, void* pData)
{
SysTryReturn(NID_SHELL, pArg || pArg->id || pArg->pkgname, 0, E_SUCCESS, "pArg is null!");
{
SysTryReturn(NID_SHELL, pArg || pArg->id || pArg->pkgname, 0, E_SUCCESS, "pArg is null!");
-AppWidgetManagerService::OnAppWidgetResumeAll(struct event_arg *pArg, void* pData)
+AppWidgetManagerService::OnAppWidgetForegroundAll(struct event_arg *pArg, void* pData)
{
unique_ptr< IMapEnumeratorT<String, _AppWidgetContext*> > pAppWidgetContextEnum((AppWidgetManagerService::GetInstance()->__appWidgetContextList).GetMapEnumeratorN());
SysTryReturn(NID_SHELL, pAppWidgetContextEnum, -1, E_SYSTEM, "[E_SYSTEM]");
{
unique_ptr< IMapEnumeratorT<String, _AppWidgetContext*> > pAppWidgetContextEnum((AppWidgetManagerService::GetInstance()->__appWidgetContextList).GetMapEnumeratorN());
SysTryReturn(NID_SHELL, pAppWidgetContextEnum, -1, E_SYSTEM, "[E_SYSTEM]");
cbs.connected = AppWidgetConnected,
cbs.disconnected = AppWidgetDisconnected,
cbs.connected = AppWidgetConnected,
cbs.disconnected = AppWidgetDisconnected,
- cbs.pause = OnAppWidgetPauseAll,
- cbs.resume = OnAppWidgetResumeAll,
- cbs.lb_pause = OnAppWidgetPause,
- cbs.lb_resume = OnAppWidgetResume,
+ cbs.pause = OnAppWidgetBackgroundAll,
+ cbs.resume = OnAppWidgetForegroundAll,
+ cbs.lb_pause = OnAppWidgetBackground,
+ cbs.lb_resume = OnAppWidgetForeground,
cbs.lb_create = OnAppWidgetCreate,
cbs.lb_destroy = OnAppWidgetDestroy,
cbs.update_content = OnAppWidgetUpdate,
cbs.lb_create = OnAppWidgetCreate,
cbs.lb_destroy = OnAppWidgetDestroy,
cbs.update_content = OnAppWidgetUpdate,