For NSE_41953
authorrashmi udaya <rashmi.uday@samsung.com>
Wed, 19 Jun 2013 10:29:00 +0000 (15:59 +0530)
committerrashmi udaya <rashmi.uday@samsung.com>
Wed, 19 Jun 2013 10:29:00 +0000 (15:59 +0530)
Change-Id: I975f67b6695f5012299c269edf72e2292ccba725

inc/GlFileListPresentationModel.h
src/GlAlbumListPresentationModel.cpp
src/GlFileListPresentationModel.cpp

index 8de341f..e506261 100644 (file)
@@ -99,6 +99,7 @@ public:
        virtual result RotateImage(int index, RotateMode rotateMode);
 
        void ClearImageCache(void);
+       void ClearProviderId(void);
 private:
        FileListPresentationModel(void);
        virtual ~FileListPresentationModel(void);
index 8a7b7c1..4d39e5f 100644 (file)
@@ -27,6 +27,7 @@
 #include "GlAlbumListPresentationModel.h"
 #include "GlAlbumRenameEventListener.h"
 #include "GlContentUpdateEventListener.h"
+#include "GlFileListPresentationModel.h"
 #include "GlGalleryApp.h"
 #include "GlThumbnailEvent.h"
 #include "GlThumbnailEventArg.h"
@@ -505,6 +506,7 @@ AlbumListPresentationModel::StartAppControl(const String& providerId, const Stri
                IAppControlResponseListener* pListener)
 {
        AppLogDebug("ENTER");
+       FileListPresentationModel::GetInstance()->ClearProviderId();
        AppControl* pAc = AppManager::FindAppControlN(providerId, operationId);
        if (pAc == null)
        {
@@ -1018,10 +1020,12 @@ AlbumListPresentationModel::OnThumbnailReceivedN(IEventArg& eventArg)
                if (__pAlbumInfoList != null)
                {
                        int outterLoopCount = __pAlbumInfoList->GetCount();
+                       AppLogDebug("rashmi outterLoopCount(%d)", outterLoopCount);
                        for (int x = 0; x < outterLoopCount; ++x)
                        {
                                AlbumInfo* pAlbumInfo = static_cast<AlbumInfo*>(__pAlbumInfoList->GetAt(x));
                                int innerLoopCount = pAlbumInfo->GetContentIdCount();
+                               AppLogDebug("rashmi innerLoopCount(%d)", innerLoopCount);
                                for (int i = 0; i < innerLoopCount; ++i)
                                {
                                        if (i >= FOLDER_BITMAP_MAX)
@@ -1035,7 +1039,16 @@ AlbumListPresentationModel::OnThumbnailReceivedN(IEventArg& eventArg)
                                                {
                                                        pAlbumInfo->SetFolderThumnailBitmap(pThumbnailInfo->GetBitmapN());
                                                        pUpdateFolderIndex->Add(new (std::nothrow) Integer(x));
+                                                       AppLogDebug("rashmi adding(%d)", x);
                                                }
+                                               else
+                                               {
+                                                       AppLogDebug("rashmi GetFolderThumnailBitmap is not null(%d)", innerLoopCount);
+                                               }
+                                       }
+                                       else
+                                       {
+                                               AppLogDebug("rashmi contetentid not same(%d)", innerLoopCount);
                                        }
                                }
                        }
@@ -1050,6 +1063,8 @@ AlbumListPresentationModel::OnThumbnailReceivedN(IEventArg& eventArg)
                                pListener = static_cast<IAlbumEventListener*>(pEnum->GetCurrent());
 
                                int loopCount = pUpdateFolderIndex->GetCount();
+                               AppLogDebug("rashmi loopCount(%d)", loopCount);
+       //                      int loopCount = __pAlbumInfoList->GetCount();
                                for (int k = 0; k < loopCount; ++k)
                                {
                                        Integer *pIndex = (Integer*)pUpdateFolderIndex->GetAt(k);
index 32f37fd..40ba749 100644 (file)
@@ -1010,6 +1010,12 @@ FileListPresentationModel::MoveToContentFile(const ContentId& contentId, const S
        return r;
 }
 
+void
+FileListPresentationModel::ClearProviderId(void)
+{
+       __providerId.Clear();
+}
+
 result
 FileListPresentationModel::StartAppControl(const String& providerId, const String& operationId,
                const String* pUriData, const Tizen::Base::String* pMimeType, const HashMap* pDataList,
@@ -1017,8 +1023,11 @@ FileListPresentationModel::StartAppControl(const String& providerId, const Strin
 {
        AppLogDebug("ENTER");
        AppControl* pAc = AppManager::FindAppControlN(providerId, operationId);
-       __providerId.Clear();
+
+       AppLogDebug("rashmi b4(%ls)", __providerId.GetPointer());
+       ClearProviderId();
        __providerId.Append(providerId);
+       AppLogDebug("rashmi after(%ls)", __providerId.GetPointer());
 
        if (pAc == null)
        {
@@ -1612,6 +1621,7 @@ FileListPresentationModel::ClearImageCache(void)
 
        if(__pIconListViewCache != null && __providerId.Equals(APPCONTROL_PROVIDER_ID_IMAGE, false) == true)
        {
+               AppLogDebug("rashmi __providerId(%ls)", __providerId.GetPointer());
                bool clearThumbnailReq = true;
                while(__pIconListViewCache->GetCount() != 0)
                {