result OnAppWidgetForegroundAll(void);
result RequestUpdate(const Tizen::Base::String& providerName, const Tizen::Base::String& argument);
+ result RequestUpdateAllInactiveted(void);
result SendRequestToApp(const Tizen::App::AppId& providerAppId, const Tizen::Base::String& operation, Tizen::Base::Collection::HashMap* pArgs);
result SendPendingEvent(void);
int GetWidth(void) const;
int GetHeight(void) const;
int GetPriority(void) const;
+ bool IsActive(void) const;
private:
result SendAddRequest(int width, int height) const;
_AppWidgetContext* FindAppWidget(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId) const;
void StartPingTimer(void);
virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
- result RequestUpdateAllSuspened(void) const;
+ result RequestUpdateAllInactiveted(void) const;
static void InitSingleton(void);
static void DestroySingleton(void);
static bool SetSettingEventListener(Tizen::System::ISettingEventListener& listener);
result
_AppContext::RequestUpdate(const Tizen::Base::String& providerName, const Tizen::Base::String& argument)
{
+ SysLog(NID_SHELL, "Enter.");
bool found = false;
- bool requestToAll = providerName.IsEmpty();
unique_ptr< IMapEnumeratorT<String, _AppWidgetContext*> > pAppWidgetContextEnum(__appWidgetContextList.GetMapEnumeratorN());
SysTryReturnResult(NID_SHELL, pAppWidgetContextEnum, E_SYSTEM, "Failed to invoke __appWidgetContextList.GetMapEnumeratorN()");
_AppWidgetContext* pAppWidgetContext = null;
pAppWidgetContextEnum->GetValue(pAppWidgetContext);
- if (pAppWidgetContext->GetProviderName() == providerName || requestToAll == true)
+ if (pAppWidgetContext->GetProviderName() == providerName)
{
pAppWidgetContext->OnUpdateAsync(this, argument);
found = true;
return (found) ? E_SUCCESS : E_OBJ_NOT_FOUND;
}
+result
+_AppContext::RequestUpdateAllInactiveted(void)
+{
+ SysLog(NID_SHELL, "Exit.");
+ unique_ptr< IMapEnumeratorT<String, _AppWidgetContext*> > pAppWidgetContextEnum(__appWidgetContextList.GetMapEnumeratorN());
+ SysTryReturnResult(NID_SHELL, pAppWidgetContextEnum, E_SYSTEM, "Failed to invoke __appWidgetContextList.GetMapEnumeratorN()");
+
+ while (pAppWidgetContextEnum->MoveNext() == E_SUCCESS)
+ {
+ _AppWidgetContext* pAppWidgetContext = null;
+ pAppWidgetContextEnum->GetValue(pAppWidgetContext);
+
+ if (pAppWidgetContext->IsActive() == false)
+ {
+ pAppWidgetContext->OnUpdateAsync(this, L"");
+ }
+ }
+
+ SysLog(NID_SHELL, "Exit.");
+ return E_SUCCESS;
+}
+
result
_AppContext::OnAppWidgetBackground(const Tizen::Base::String& instanceId)
{
return __instanceId;
}
+bool
+_AppWidgetContext::IsActive(void) const
+{
+ return __isRemoteBufferProxyCreated;
+}
+
void
_AppWidgetContext::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
{
|| key == KEY_SETTING_COUNTRY )
{
SysLog(NID_SHELL, "'%ls' is changed.", key.GetPointer() );
- RequestUpdateAllSuspened();
+ RequestUpdateAllInactiveted();
}
}
}
result
-AppWidgetManagerService::RequestUpdateAllSuspened(void) const
+AppWidgetManagerService::RequestUpdateAllInactiveted(void) const
{
+ SysLog(NID_SHELL, "Enter.");
unique_ptr< IMapEnumeratorT<String, _AppContext*> > pAppContextEnum(__appContextList.GetMapEnumeratorN());
SysTryReturnResult(NID_SHELL, pAppContextEnum, E_SYSTEM, "Failed to invoke __appContextList.GetMapEnumeratorN()");
_AppContext* pAppContext = null;
pAppContextEnum->GetValue(pAppContext);
- if ( pAppContext && _AppManagerImpl::GetInstance()->IsRunning(pAppContext->GetAppId()) == false )
+ if (pAppContext)
{
- pAppContext->RequestUpdate(L"", L"");
+ pAppContext->RequestUpdateAllInactiveted();
}
}