if (__pIconListViewCache != null)
{
+ __pIconListViewCache->RemoveAll(true);
delete __pIconListViewCache;
+ __pIconListViewCache = null;
}
__pIconListViewCache = new (std::nothrow) ArrayList(SingleObjectDeleter);
__pIconListViewCache->Construct(SIZE_ICON_LIST_CACHE);
if (__pIconListViewCache != null)
{
+ __pIconListViewCache->RemoveAll(true);
delete __pIconListViewCache;
__pIconListViewCache = null;
}
}
}
+ delete pEnum;
+
if (isMatch == false)
{
if (SIZE_ICON_LIST_CACHE <= __pIconListViewCache->GetCount())
AppLogDebug("ENTER");
AppControl* pAc = AppManager::FindAppControlN(providerId, operationId);
- AppLogDebug("rashmi b4(%ls)", __providerId.GetPointer());
ClearProviderId();
__providerId.Append(providerId);
- AppLogDebug("rashmi after(%ls)", __providerId.GetPointer());
if (pAc == null)
{
return r;
}
+void
+FileListPresentationModel::AddDirectoryIfNew(const String& dirName)
+{
+ bool isMatched = false;
+ int dirCount = __pDirectoryList->GetCount();
+ if (__albumName != ResourceManager::GetString(L"IDS_MEDIABR_BODY_ALL_ALBUMS"))//we are not in All albums
+ {
+ return;
+ }
+ for (int i = 0; i < dirCount ; ++i)
+ {
+ if (static_cast<String*>(__pDirectoryList->GetAt(i))->CompareTo(dirName) == 0)
+ {
+ isMatched = true;
+ break;
+ }
+ }
+ if (!isMatched)
+ {
+ String fullPath = Environment::GetMediaPath();
+ fullPath.Append(dirName);
+ __pDirectoryList->Add(new (std::nothrow) String(fullPath));
+
+ }
+}
+
+
+
result
FileListPresentationModel::RefreshContentInfoList(const ContentType contentType)
{
delete __pContentInfoList;
__pContentInfoList = null;
}
+
__pContentInfoList = GetContentInfoListInDirectoryListN(*__pDirectoryList, __albumContentType);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
if (r == E_SUCCESS)
{
imageFormat = img.GetImageFormat(filePath);
- }
- r = rotateBuffer.Construct(filePath);
- if (r == E_SUCCESS)
- {
- if (rotateMode == ROTATE_MODE_RIGHT)
+ r = rotateBuffer.Construct(filePath);
+ if (r == E_SUCCESS)
{
- pRotatedBuffer = rotateBuffer.RotateN(IMAGE_ROTATION_90);
+ if (rotateMode == ROTATE_MODE_RIGHT)
+ {
+ pRotatedBuffer = rotateBuffer.RotateN(IMAGE_ROTATION_90);
+ }
+ else
+ {
+ pRotatedBuffer = rotateBuffer.RotateN(IMAGE_ROTATION_270);
+ }
}
- else
+
+ if (pRotatedBuffer != null)
{
- pRotatedBuffer = rotateBuffer.RotateN(IMAGE_ROTATION_270);
+ r = pRotatedBuffer->EncodeToFile(filePath, imageFormat, true, 100);
+ delete pRotatedBuffer;
+ ContentManager::ScanFile(filePath);
}
}
- if (pRotatedBuffer != null)
- {
- r = pRotatedBuffer->EncodeToFile(filePath, imageFormat, true, 100);
- delete pRotatedBuffer;
- ContentManager::ScanFile(filePath);
- }
return r;
}
void
FileListPresentationModel::ClearImageCache(void)
{
- AppLogDebug("FileListPresentationModel::ClearImageCache ++");
+ AppLogDebug("ENTER");
- if(__pIconListViewCache != null && __providerId.Equals(APPCONTROL_PROVIDER_ID_IMAGE, false) == true)
+ if(__pIconListViewCache != null)
{
- AppLogDebug("rashmi __providerId(%ls)", __providerId.GetPointer());
bool clearThumbnailReq = true;
while(__pIconListViewCache->GetCount() != 0)
{
__pIconListViewCache->RemoveAt(0, true);
}
}
- AppLogDebug("FileListPresentationModel::ClearImageCache --");
+ AppLogDebug("EXIT");
}
void