fix touch event delivery problem
authorjungmin76.park <jungmin76.park@samsung.com>
Thu, 28 Mar 2013 07:49:30 +0000 (16:49 +0900)
committerjungmin76.park <jungmin76.park@samsung.com>
Thu, 28 Mar 2013 07:49:30 +0000 (16:49 +0900)
Change-Id: I63b7ed12c6f63aa3e9c83e11edb983d7489cc65b
Signed-off-by: jungmin76.park <jungmin76.park@samsung.com>
inc/FShell_AppWidgetContext.h
inc/FShell_AppWidgetContextBase.h
inc/FShell_AppWidgetManagerService.h
src/FShell_AppWidgetContext.cpp
src/FShell_AppWidgetContextBase.cpp
src/FShell_AppWidgetManagerService.cpp
src/FShell_AppWidgetPopupContext.cpp

index a6f9ec3..7597fca 100644 (file)
@@ -31,7 +31,7 @@
 #include <FAppTypes.h>
 #include <FBaseRtTimer.h>
 #include <FBaseObject.h>
-#include <FBaseColArrayList.h>
+#include <FBaseColArrayListT.h>
 
 #include "FShell_AppWidgetContextBase.h"
 
@@ -57,6 +57,7 @@ public:
        void OnRemoved();
        void OnForeground();
        void OnBackground();
+
        virtual void OnPopupCreated(double x, double y, int width, int height);
        virtual void OnPopupDestoyed(void);
 
@@ -74,15 +75,28 @@ private:
        result SendRemoveRequest();
 
        result SendRequestToApp(const Tizen::App::AppId& appId, const Tizen::Base::String& operation, Tizen::Base::Collection::HashMap* pArgs);
+       void SendPendingTouchEvent(void);
 
        virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
 
+       struct PendingTouchEvent
+       {
+       public:
+               PendingTouchEvent(int eventType, double timeStamp, double       x, double       y)
+                : eventType(eventType), timeStamp(timeStamp), x(x), y(y) {  }
+
+               int eventType;
+               double  timeStamp;
+               double  x;
+               double  y;
+       };
+
 private:
        _AppWidgetPopupContext* __pAppWidgetPopup;
        Tizen::Base::Runtime::Timer __lifeDurationTimer;
        Tizen::Base::Runtime::Timer __UpdateTimer;
-       int __UpdateMillis;
-
+       int __updateMillis;
+       Tizen::Base::Collection::ArrayListT<PendingTouchEvent*>* __pPendingTouchEventList;
 };
 
 
index a297990..4690784 100644 (file)
@@ -41,6 +41,14 @@ namespace Tizen { namespace Shell  { namespace App
 class _AppWidgetContextBase:
        public Tizen::Base::Object
 {
+protected:
+       enum _AppWidgetProviderState
+       {
+               INVALID = 0,
+               RUNNING,
+               SUSPENDED,
+       };
+
 public:
        _AppWidgetContextBase(target_type type, const Tizen::Base::String& userInfo, const Tizen::Base::String& providerId, const Tizen::Base::String& instanceId, int width, int height, int priority);
        virtual ~_AppWidgetContextBase();
@@ -50,14 +58,18 @@ public:
 
        virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y) = 0;
 
-       void SetClientId(int clientId);
-       bool HasValidClientId() const;
+       void SetIpcClientId(int clientId);
+       bool HasValidClientId(void) const;
        // for buffered appWidget
        int GetSharedMemId(int w, int h);
-       result ReleaseSharedMem();
+       result ReleaseSharedMem(void);
 
+       void Suspend(void);
 
 protected:
+       bool IsRunning(void) const;
+       bool IsSharedMemCreated(void) const;
+
        Tizen::Base::Collection::HashMap* CreateRequestArgs(void);
        result SendRequestToApp(const Tizen::App::AppId& appId, const Tizen::Base::String& operation, Tizen::Base::Collection::HashMap* pArgs);
 
@@ -79,6 +91,7 @@ protected:
 private:
        struct livebox_buffer *__buffer_info;
        void *__buffer;
+       _AppWidgetProviderState __providerState;
 };
 
 class _AppWidgetRequestHelper
index e0743aa..a42bc43 100644 (file)
@@ -82,7 +82,7 @@ private:
        virtual void OnIpcClientDisconnected(const Tizen::Io::_IpcServer&server, int clientId);
 
        // helpers
-       result SetClientIds(const Tizen::App::AppId& appId, int clientId);
+       result SetIpcClientIds(const Tizen::App::AppId& appId, int clientId);
        int UpdateAllAppWidgetsByAppId(const Tizen::Base::String& appId);
 
        void StartPingTimer();
index 2132179..bb074f0 100644 (file)
@@ -51,31 +51,34 @@ const char APPWIDGET_ON_UPDATE[] = "http://tizen.org/appcontrol/appwidget/update
 const char APPWIDGET_ON_RESIZE[] = "http://tizen.org/appcontrol/appwidget/resize";
 const char APPWIDGET_ON_TOUCH[] = "http://tizen.org/appcontrol/appwidget/touch";
 
-const String ARG_KEY_WIDTH = L"_Width";
-const String ARG_KEY_HEIGHT = L"_Height";
 const String ARG_KEY_ARGUMENT = L"_Argument";
 const String ARG_KEY_EVENT_TYPE = L"_EventType";
 const String ARG_KEY_TIME_STAMP = L"_TimeStamp";
 const String ARG_KEY_X = L"_X";
 const String ARG_KEY_Y = L"_Y";
 
-const int LIVE_DURATION_MSEC= 30000;//30sec
+const int DEFAULT_LIFE_DURATION_MSEC = 30000;//30sec
+const int UPDATE_PERIOD_MSEC_MIN = 1800000;//30min
 
 _AppWidgetContext::_AppWidgetContext(const String& info, const String& providerId, const String& instanceId, int width, int height, int period, int priority)
-:_AppWidgetContextBase(TYPE_LB, info, providerId, instanceId, width, height, priority)
-,__pAppWidgetPopup(null), __UpdateMillis(period)
+ :_AppWidgetContextBase(TYPE_LB, info, providerId, instanceId, width, height, priority)
+ ,__pAppWidgetPopup(null)
+ ,__updateMillis(period)
+ ,__pPendingTouchEventList(null)
 {
-       SysLog(NID_APP, "period(%d)", period);
-
        __lifeDurationTimer.Construct(*this);//, true);
-       __lifeDurationTimer.Start(LIVE_DURATION_MSEC);
+       __lifeDurationTimer.Start(DEFAULT_LIFE_DURATION_MSEC );
 
-       SysLog(NID_APP, "period(%d)", __UpdateMillis);
-       if( __UpdateMillis > 0)
+       __updateMillis = (__updateMillis > UPDATE_PERIOD_MSEC_MIN) ? __updateMillis : UPDATE_PERIOD_MSEC_MIN;
+       SysLog(NID_APP, "period(%d)", __updateMillis);
+       if( __updateMillis > 0)
        {
                __UpdateTimer.Construct(*this);//, false);
-               __UpdateTimer.StartAsRepeatable(__UpdateMillis);
+               __UpdateTimer.StartAsRepeatable(__updateMillis);
        }
+
+       __pPendingTouchEventList = new ArrayListT<PendingTouchEvent*>();
+       __pPendingTouchEventList->Construct();
 }
 
 _AppWidgetContext::~_AppWidgetContext()
@@ -90,6 +93,19 @@ _AppWidgetContext::~_AppWidgetContext()
                __pAppWidgetPopup->OnPopupDestoyed();
                delete __pAppWidgetPopup;
        }
+
+
+       if( __pPendingTouchEventList )
+       {
+               for( int i = 0; i < __pPendingTouchEventList->GetCount(); i++)
+               {
+                       PendingTouchEvent* pTouchEvent = null;
+                       __pPendingTouchEventList->GetAt(i, pTouchEvent);
+                       delete pTouchEvent;
+               }
+               __pPendingTouchEventList->RemoveAll();
+               delete __pPendingTouchEventList;
+       }
 }
 
 _AppWidgetPopupContext*
@@ -135,7 +151,7 @@ _AppWidgetContext::OnForeground()
        __isForeground = true;
 
        __UpdateTimer.Cancel();
-       __UpdateTimer.StartAsRepeatable(__UpdateMillis);
+       __UpdateTimer.StartAsRepeatable(__updateMillis);
 }
 
 void
@@ -150,7 +166,7 @@ void
 _AppWidgetContext::OnPopupCreated(double x, double y, int width, int height)
 {
        __pAppWidgetPopup = new (std::nothrow) _AppWidgetPopupContext(__userInfo, __providerId, __instanceId, width, height, __priority);
-       __pAppWidgetPopup->SetClientId(__ipcClientId);
+       __pAppWidgetPopup->SetIpcClientId(__ipcClientId);
        __pAppWidgetPopup->OnPopupCreated(x, y, width, height);
 
        __lifeDurationTimer.Cancel();
@@ -159,6 +175,7 @@ _AppWidgetContext::OnPopupCreated(double x, double y, int width, int height)
 void
 _AppWidgetContext::OnPopupDestoyed(void)
 {
+       SysLog(NID_APP, "");
        if (__pAppWidgetPopup)
        {
                __pAppWidgetPopup->OnPopupDestoyed();
@@ -171,19 +188,8 @@ _AppWidgetContext::OnPopupDestoyed(void)
 result
 _AppWidgetContext::SendAddRequest(int width, int height)
 {
-/*     std::unique_ptr<ArrayList, AllElementsDeleter> pArgs (new (std::nothrow) ArrayList);
-       pArgs->Construct();
-       pArgs->Add(*new String(__instanceId));
-       pArgs->Add(*new String(__providerId));
-       pArgs->Add(*new String(__info));
-       pArgs->Add(*new String(Integer::ToString(width)));
-       pArgs->Add(*new String(Integer::ToString(height)));*/
-
        std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
 
-       pArgs->Add(new String(ARG_KEY_WIDTH), new String(Integer::ToString(width)));
-       pArgs->Add(new String(ARG_KEY_HEIGHT), new String(Integer::ToString(height)));
-
        return SendRequestToApp( __appId, APPWIDGET_ON_ADD, pArgs.get());
 }
 
@@ -192,8 +198,6 @@ _AppWidgetContext::SendUpdateRequest(int width, int height, const String& argume
 {
        std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
 
-       pArgs->Add(new String(ARG_KEY_WIDTH), new String(Integer::ToString(width)));
-       pArgs->Add(new String(ARG_KEY_HEIGHT), new String(Integer::ToString(height)));
        pArgs->Add(new String(ARG_KEY_ARGUMENT), new String(argument));
 
        return SendRequestToApp( __appId, APPWIDGET_ON_UPDATE, pArgs.get());
@@ -204,9 +208,6 @@ _AppWidgetContext::SendResizeRequest(int width, int height)
 {
        std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
 
-       pArgs->Add(new String(ARG_KEY_WIDTH), new String(Integer::ToString(width)));
-       pArgs->Add(new String(ARG_KEY_HEIGHT), new String(Integer::ToString(height)));
-
        return SendRequestToApp( __appId, APPWIDGET_ON_RESIZE, pArgs.get());
 }
 
@@ -218,26 +219,43 @@ _AppWidgetContext::SendRemoveRequest()
        return SendRequestToApp( __appId, APPWIDGET_ON_REMOVE, pArgs.get());
 }
 
+void
+_AppWidgetContext::SendPendingTouchEvent(void)
+{
+       for(int i =0; i< __pPendingTouchEventList->GetCount(); i++)
+       {
+               PendingTouchEvent* pTouchEvent = null;
+               __pPendingTouchEventList->GetAt(i, pTouchEvent);
+               AppWidgetManagerService::GetInstance()->SendTouchEvent(__ipcClientId, __instanceId, pTouchEvent->eventType, pTouchEvent->timeStamp, pTouchEvent->x, pTouchEvent->y);
+               delete pTouchEvent;
+       }
+       __pPendingTouchEventList->RemoveAll();
+}
+
 result
-_AppWidgetContext::SendTouchEvent(buffer_event event, double timestamp, double x, double y)
+_AppWidgetContext::SendTouchEvent(buffer_event eventType, double timeStamp, double x, double y)
 {
-       SysLog(NID_APP, "");
-       if( HasValidClientId() == false )
+       if( HasValidClientId() && IsRunning() )
+       {
+               SysAssert(IsSharedMemCreated() == true);
+               SysLog(NID_APP, "send IPC message");
+               AppWidgetManagerService::GetInstance()->SendTouchEvent(__ipcClientId, __instanceId, eventType, timeStamp, x, y);
+       }
+       else
        {
+               SysLog(NID_APP, "request to start AppControl");
+               __pPendingTouchEventList->Add(new PendingTouchEvent(eventType, timeStamp, x, y));
+
+               //
                std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgs() );
 
-               pArgs->Add(new String(ARG_KEY_EVENT_TYPE), new String(Integer::ToString(event)));
-               pArgs->Add(new String(ARG_KEY_TIME_STAMP), new String(Double::ToString(timestamp)));
+               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( __appId, APPWIDGET_ON_TOUCH, pArgs.get());
        }
-       else
-       {
-//             SysAssertf( Tizen::App::AppManager::GetInstance()->IsRunning(__appId) == false, "application isn't running");
-               AppWidgetManagerService::GetInstance()->SendTouchEvent(__ipcClientId, __instanceId, event, timestamp, x, y);
-       }
        return E_SUCCESS;
 }
 
@@ -265,6 +283,7 @@ _AppWidgetContext::RequestUpdateRemote(int width, int height)
        int ret = provider_send_updated(packageName.get(), id.get(), width, height, __priority, content_info.get(), null);
        SysTryReturnResult(NID_APP, ret >= 0 , E_SYSTEM, "[E_SYSTEM] failed to provider_send_updated");
 
+       SendPendingTouchEvent();
        SysLog(NID_APP, "Done");
        return E_SUCCESS;
 }
@@ -273,20 +292,18 @@ void
 _AppWidgetContext::RestartLifeDurationTimer()
 {
        __lifeDurationTimer.Cancel();
-       __lifeDurationTimer.Start(LIVE_DURATION_MSEC);
-       SysLog(NID_APP, "lifeDuration timer restarted (%d)msec", LIVE_DURATION_MSEC);
+       __lifeDurationTimer.Start(DEFAULT_LIFE_DURATION_MSEC);
+       SysLog(NID_APP, "lifeDuration timer restarted (%d)msec", DEFAULT_LIFE_DURATION_MSEC);
 }
 
 void
 _AppWidgetContext::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
 {
-       SysLog(NID_APP, "");
-
        if( &timer == &__lifeDurationTimer)
        {
                SysLog(NID_APP, "lifeDuration timer is expired, so terminating appWidget app(%ls)..", __providerId.GetPointer() );
 
-               ReleaseSharedMem();
+//             ReleaseSharedMem();
                AppManager::GetInstance()->TerminateApplication(__appId);
 
        }
index c952843..9bce5a2 100644 (file)
@@ -88,6 +88,8 @@ using namespace Tizen::Base::Collection;
 const String ARG_KEY_INSTANCE_ID = L"_InstanceId";
 const String ARG_KEY_PROVIDER_NAME = L"_ProviderName";
 const String ARG_KEY_USER_INFO = L"_UserInfo";
+const String ARG_KEY_WIDTH = L"_Width";
+const String ARG_KEY_HEIGHT = L"_Height";
 
 
 _AppWidgetContextBase::_AppWidgetContextBase(target_type type, const String& userInfo, const String& providerId, const String& instanceId, int width, int height, int priority)
@@ -102,6 +104,7 @@ _AppWidgetContextBase::_AppWidgetContextBase(target_type type, const String& use
        ,__ipcClientId(-1)
        ,__buffer_info(null)
        ,__buffer(null)
+       ,__providerState(INVALID)
 {
        _AppWidgetManagerImpl::ExtractAppIdAndProviderName(providerId, __appId, __providerName);
 
@@ -111,22 +114,29 @@ _AppWidgetContextBase::_AppWidgetContextBase(target_type type, const String& use
 _AppWidgetContextBase::~_AppWidgetContextBase()
 {
        SysLog(NID_APP, "providerId(%ls), instanceId(%ls), width(%d), height(%d), priority(%d)", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height, __priority);
+       ReleaseSharedMem();
 }
 
 
 void
-_AppWidgetContextBase::SetClientId(int clientId)
+_AppWidgetContextBase::SetIpcClientId(int clientId)
 {
        __ipcClientId = clientId;
 }
 
 bool
-_AppWidgetContextBase::HasValidClientId() const
+_AppWidgetContextBase::HasValidClientId(void) const
 {
        SysLog(NID_APP, "%d", __ipcClientId);
        return (__ipcClientId > -1);
 }
 
+bool
+_AppWidgetContextBase::IsSharedMemCreated(void) const
+{
+       return ( __buffer_info && __buffer_info);
+}
+
 int
 _AppWidgetContextBase::GetSharedMemId(int w, int h)
 {
@@ -147,11 +157,25 @@ _AppWidgetContextBase::GetSharedMemId(int w, int h)
        }
 
     int bufferId = __buffer_info->fb->handle;
+    __providerState = RUNNING;
 
     SysLog(NID_APP, "(%d) Exit", bufferId);
     return bufferId;
 }
 
+
+void
+_AppWidgetContextBase::Suspend()
+{
+       __providerState = SUSPENDED;
+}
+
+bool
+_AppWidgetContextBase::IsRunning() const
+{
+       return (__providerState == RUNNING);
+}
+
 result
 _AppWidgetContextBase::ReleaseSharedMem()
 {
@@ -188,6 +212,8 @@ _AppWidgetContextBase::CreateRequestArgs(void)
        pArgs->Add(new String(ARG_KEY_INSTANCE_ID), new String(__instanceId));
        pArgs->Add(new String(ARG_KEY_PROVIDER_NAME), new String(__providerName));
        pArgs->Add(new String(ARG_KEY_USER_INFO), new String(__userInfo));
+       pArgs->Add(new String(ARG_KEY_WIDTH), new String(Integer::ToString(__width)));
+       pArgs->Add(new String(ARG_KEY_HEIGHT), new String(Integer::ToString(__height)));
 
        return pArgs;
 }
index 26a3c05..8e9349f 100644 (file)
@@ -156,7 +156,7 @@ AppWidgetManagerService::Find(const String& appId, const String& instanceId) con
 }
 
 result
-AppWidgetManagerService::SetClientIds(const Tizen::App::AppId& appId, int clientId)
+AppWidgetManagerService::SetIpcClientIds(const Tizen::App::AppId& appId, int clientId)
 {
        for( int i = 0; i < __appWidgetContextList.GetCount(); i++ )
        {
@@ -167,11 +167,14 @@ AppWidgetManagerService::SetClientIds(const Tizen::App::AppId& appId, int client
 
                if ( pAppWidgetContext->__appId == appId )
                {
-                       pAppWidgetContext->SetClientId(clientId);
+                       SysLog(NID_APP,"");
+                       pAppWidgetContext->SetIpcClientId(clientId);
                        SysLog(NID_APP, "client is registered.(%d)", clientId);
-                       if( clientId == -1)
+
+                       if( clientId == -1)//disconnected
                        {
-                               pAppWidgetContext->ReleaseSharedMem();
+//                             pAppWidgetContext->ReleaseSharedMem();
+                               pAppWidgetContext->Suspend();
                                if(pAppWidgetContext->GetAppWidgetPopup())
                                {
                                        pAppWidgetContext->OnPopupDestoyed();
@@ -185,19 +188,19 @@ AppWidgetManagerService::SetClientIds(const Tizen::App::AppId& appId, int client
 void
 AppWidgetManagerService::OnIpcClientConnected(const _IpcServer& server, int clientId)
 {
-       //SysLog(NID_APP, "(clientId:%d)\n", clientId);
-       String fullAppId = server.GetClientApplicationId();
-       SysLog(NID_APP, "(%ls)\n", fullAppId.GetPointer());
-//     this->SetClientIds(fullAppId, clientId);//Todo
+       String appId = server.GetClientApplicationId();
+       SysLog(NID_APP, "(%ls)\n", appId.GetPointer());
 
+       this->SetIpcClientIds(appId, clientId);
 }
 
 void
 AppWidgetManagerService::OnIpcClientDisconnected(const _IpcServer& server, int clientId)
 {
-       String fullAppId = server.GetClientApplicationId();
-       SysLog(NID_APP, "(%ls)\n", fullAppId.GetPointer());
-       this->SetClientIds(fullAppId, -1);
+       String appId = server.GetClientApplicationId();
+       SysLog(NID_APP, "(%ls)\n", appId.GetPointer());
+
+       this->SetIpcClientIds(appId, -1);
 }
 
 result
@@ -530,11 +533,11 @@ AppWidgetManagerService::RequestSharedMemoryId(const Tizen::App::AppId& appId, c
        _AppWidgetContext* pAppWidgetContext = this->Find(appId, instanceId);
        SysTryReturnResult(NID_APP, pAppWidgetContext , E_SYSTEM, "[E_SYSTEM] pAppWidgetContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
 
-       if(pAppWidgetContext->HasValidClientId() == false)
-       {
-               String fullAppId = __pIpcServer->GetClientApplicationId();
-               this->SetClientIds(fullAppId, __pIpcServer->GetClientId());
-       }
+//     if(pAppWidgetContext->HasValidClientId() == false)
+//     {
+//             String fullAppId = __pIpcServer->GetClientApplicationId();
+//             this->SetIpcClientIds(fullAppId, __pIpcServer->GetClientId());
+//     }
 
        shmId = pAppWidgetContext->GetSharedMemId(width, height);
        SysTryReturnResult(NID_APP, pAppWidgetContext , shmId != -1, "[E_SYSTEM] failed to GetSharedMemId for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
@@ -554,7 +557,7 @@ AppWidgetManagerService::RequestSharedMemoryIdForPD(const Tizen::App::AppId& app
        if(pPd->HasValidClientId() == false)
        {
                String fullAppId = __pIpcServer->GetClientApplicationId();
-               pPd->SetClientId(__pIpcServer->GetClientId());
+               pPd->SetIpcClientId(__pIpcServer->GetClientId());
        }
 
        shmId = pPd->GetSharedMemId(width, height);
@@ -585,25 +588,26 @@ AppWidgetManagerService::RequestSyncSharedMemoryForPD(const Tizen::App::AppId& a
 result
 AppWidgetManagerService::RequestReleaseSharedMemory(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId)
 {
-       std::unique_ptr<char[]> pkgname(_StringConverter::CopyToCharArrayN(appId));
-       std::unique_ptr<char[]> id(_StringConverter::CopyToCharArrayN(instanceId));
-
-       _AppWidgetContext* pAppWidgetContext = this->Find(appId, instanceId);
-       SysTryReturnResult(NID_APP, pAppWidgetContext , E_SYSTEM, "[E_SYSTEM] pAppWidgetContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
-
-       return pAppWidgetContext->ReleaseSharedMem();
+//     std::unique_ptr<char[]> pkgname(_StringConverter::CopyToCharArrayN(appId));
+//     std::unique_ptr<char[]> id(_StringConverter::CopyToCharArrayN(instanceId));
+//
+//     _AppWidgetContext* pAppWidgetContext = this->Find(appId, instanceId);
+//     SysTryReturnResult(NID_APP, pAppWidgetContext , E_SYSTEM, "[E_SYSTEM] pAppWidgetContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+//
+//     return pAppWidgetContext->ReleaseSharedMem();
+       return E_SUCCESS;
 }
 
 result
 AppWidgetManagerService::RequestReleaseSharedMemoryForPD(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId)
 {
-       std::unique_ptr<char[]> pkgname(_StringConverter::CopyToCharArrayN(appId));
-       std::unique_ptr<char[]> id(_StringConverter::CopyToCharArrayN(instanceId));
-
-       _AppWidgetContext* pAppWidgetContext = this->Find(appId, instanceId);
-       SysTryReturnResult(NID_APP, pAppWidgetContext , E_SYSTEM, "[E_SYSTEM] pAppWidgetContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
-       SysTryReturnResult(NID_APP, pAppWidgetContext->GetAppWidgetPopup(), E_SYSTEM, "[E_SYSTEM] GetAppWidgetPopup() returns null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
-
+//     std::unique_ptr<char[]> pkgname(_StringConverter::CopyToCharArrayN(appId));
+//     std::unique_ptr<char[]> id(_StringConverter::CopyToCharArrayN(instanceId));
+//
+//     _AppWidgetContext* pAppWidgetContext = this->Find(appId, instanceId);
+//     SysTryReturnResult(NID_APP, pAppWidgetContext , E_SYSTEM, "[E_SYSTEM] pAppWidgetContext is null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+//     SysTryReturnResult(NID_APP, pAppWidgetContext->GetAppWidgetPopup(), E_SYSTEM, "[E_SYSTEM] GetAppWidgetPopup() returns null for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+//
 //     return pAppWidgetContext->GetAppWidgetPopup()->ReleaseSharedMem();
        return E_SUCCESS;
 }
index 064ef12..efc3935 100644 (file)
@@ -60,7 +60,6 @@ _AppWidgetPopupContext::_AppWidgetPopupContext(const String& info, const String&
 _AppWidgetPopupContext::~_AppWidgetPopupContext()
 {
        SysLog(NID_APP, "appId(%ls), instanceId(%ls), width(%d), height(%d))", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height);
-       ReleaseSharedMem();
 }