From: jungmin76.park Date: Mon, 27 May 2013 10:09:35 +0000 (+0900) Subject: fix not to retry during application is launcing.. (but the proxy of the application... X-Git-Tag: submit/tizen/20130912.075546~34^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba740baa5d5856328ec4f20a9c7b27dba663651d;p=platform%2Fframework%2Fnative%2Fappwidget-service.git fix not to retry during application is launcing.. (but the proxy of the application is not yet connected to stub.) Change-Id: I244fbf484fd4de83916ed500671cf3873ff13af8 Signed-off-by: jungmin76.park --- diff --git a/src/FShell_AppWidgetContext.cpp b/src/FShell_AppWidgetContext.cpp index fc33369..70749df 100644 --- a/src/FShell_AppWidgetContext.cpp +++ b/src/FShell_AppWidgetContext.cpp @@ -21,12 +21,15 @@ #include #include + #include #include #include #include -#include #include +#include +#include + #include #include "FShell_AppWidgetManagerService.h" #include "FShell_AppWidgetPopupContext.h" @@ -296,14 +299,17 @@ _AppWidgetContext::SendTouchEvent(buffer_event eventType, double timeStamp, doub SysLog(NID_SHELL, "request to start AppControl"); __pPendingTouchEventList->Add(new PendingTouchEvent(eventType, timeStamp, x, y)); - std::unique_ptr pArgs (CreateRequestArgsN() ); + if( AppManager::GetInstance()->IsRunning(this->GetAppId() ) == false) + { + std::unique_ptr pArgs (CreateRequestArgsN() ); - pArgs->Add(new String(ARG_KEY_EVENT_TYPE), new String(Integer::ToString(eventType))); - pArgs->Add(new String(ARG_KEY_TIME_STAMP), new String(Double::ToString(timeStamp))); - pArgs->Add(new String(ARG_KEY_X), new String(Double::ToString(x))); - pArgs->Add(new String(ARG_KEY_Y), new String(Double::ToString(y))); + pArgs->Add(new String(ARG_KEY_EVENT_TYPE), new String(Integer::ToString(eventType))); + pArgs->Add(new String(ARG_KEY_TIME_STAMP), new String(Double::ToString(timeStamp))); + pArgs->Add(new String(ARG_KEY_X), new String(Double::ToString(x))); + pArgs->Add(new String(ARG_KEY_Y), new String(Double::ToString(y))); - return SendRequestToApp(GetAppId(), APPWIDGET_ON_TOUCH, pArgs.get()); + return SendRequestToApp(GetAppId(), APPWIDGET_ON_TOUCH, pArgs.get()); + } } return E_SUCCESS; } diff --git a/src/FShell_AppWidgetManagerService.cpp b/src/FShell_AppWidgetManagerService.cpp index 37185b6..3b6e0f6 100644 --- a/src/FShell_AppWidgetManagerService.cpp +++ b/src/FShell_AppWidgetManagerService.cpp @@ -175,23 +175,25 @@ AppWidgetManagerService::SetIpcClientIds(const Tizen::App::AppId& appId, int cli { _AppWidgetContext* pAppWidgetContext = null; __appWidgetContextList.GetAt(i, pAppWidgetContext); - SysSecureLog(NID_SHELL, "%ls", pAppWidgetContext->GetInstanceId().GetPointer()); - SysLog(NID_SHELL, "%ls, %ls", pAppWidgetContext->GetProviderId().GetPointer(), appId.GetPointer()); + SysSecureLog(NID_SHELL, "%ls, %ls, %ls", pAppWidgetContext->GetInstanceId().GetPointer(), pAppWidgetContext->GetProviderId().GetPointer(), appId.GetPointer()); if (pAppWidgetContext->GetAppId() == appId) { - SysLog(NID_SHELL,""); pAppWidgetContext->SetIpcClientId(clientId); - SysLog(NID_SHELL, "client is registered.(%d)", clientId); - if( clientId == -1)//disconnected + if( clientId == -1) { + SysLog(NID_SHELL, "client is unregistered."); pAppWidgetContext->Suspend(); if(pAppWidgetContext->GetAppWidgetPopup()) { pAppWidgetContext->OnPopupDestoyed(); } } + else + { + SysLog(NID_SHELL, "client is registered.(%d)", clientId); + } } } return E_SUCCESS; @@ -346,10 +348,6 @@ AppWidgetManagerService::OnAppWidgetPopupCreate(struct event_arg *arg, void* dat _AppWidgetContext* pAppWidgetContext = AppWidgetManagerService::GetInstance()->Find(arg->pkgname, arg->id); SysSecureTryReturnResult(NID_SHELL, pAppWidgetContext , E_SYSTEM, "[E_SYSTEM] pAppWidgetContext is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id); - /*if( pAppWidgetContext->GetAppWidgetPopup() ) - { - pAppWidgetContext->OnPopupDestoyed(); - }*/ pAppWidgetContext->OnPopupCreated(arg->info.pd_create.x, arg->info.pd_create.y, arg->info.pd_create.w, arg->info.pd_create.h); return 0; @@ -359,10 +357,10 @@ AppWidgetManagerService::OnAppWidgetPopupCreate(struct event_arg *arg, void* dat AppWidgetManagerService::OnAppWidgetPopupDestroy(struct event_arg *arg, void* data) { SysTryReturn (NID_SHELL, arg->type == event_arg::EVENT_PD_DESTROY, -EPERM, E_SUCCESS, "invalid argument from master"); - SysSecureLog(NID_SHELL, "packageName(%s), id(%s)", arg->pkgname, arg->id); _AppWidgetContext* pAppWidgetContext = AppWidgetManagerService::GetInstance()->Find(arg->pkgname, arg->id); SysSecureTryReturnResult(NID_SHELL, pAppWidgetContext , E_SYSTEM, "[E_SYSTEM] pAppWidgetContext is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id); + SysSecureLog(NID_SHELL, "packageName(%s), id(%s)", arg->pkgname, arg->id); pAppWidgetContext->OnPopupDestoyed(); return 0; @@ -378,13 +376,14 @@ AppWidgetManagerService::OnAppWidgetPause(struct event_arg *arg, void* data) SysSecureLog(NID_SHELL, "packageName(%s), id(%s)", arg->pkgname, arg->id); pAppWidgetContext->OnBackground(); + return 0; } int AppWidgetManagerService::OnAppWidgetPauseAll(struct event_arg *arg, void* data) { - SysLog(NID_SHELL, "OnAppWidgetPauseAll"); + SysLog(NID_SHELL, "OnAppWidgetPauseAll"); AppWidgetManagerService* pAppManagerService = AppWidgetManagerService::GetInstance(); @@ -435,7 +434,7 @@ AppWidgetManagerService::OnAppWidgetClick(struct event_arg *arg, void* data) { SysTryReturn (NID_SHELL, arg->type == event_arg::EVENT_CLICKED, -EPERM, E_SUCCESS, "invalid argument from master"); SysTryReturn(NID_SHELL, arg != null, -EPERM, E_SUCCESS, "arg is null!"); - SysSecureLog(NID_SHELL, "packageName(%s), id(%s), clicked.event(%s), clicked.x(%d), clicked.y(%d)", arg->pkgname, arg->id, arg->info.clicked.event, arg->info.clicked.x, arg->info.clicked.y); + SysSecureLog(NID_SHELL, "packageName(%s), id(%s), clicked.event(%s), clicked.x(%f), clicked.y(%f)", arg->pkgname, arg->id, arg->info.clicked.event, arg->info.clicked.x, arg->info.clicked.y); return 0; }