*/
#include <FContent.h>
+#include <FIo.h>
#include "StSettingScenesList.h"
#include "StWallpaperAlbumListPresentationModel.h"
#include "StWallpaperImageSelectForm.h"
+using namespace Tizen::App;
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
using namespace Tizen::Content;
using namespace Tizen::Graphics;
+using namespace Tizen::Io;
using namespace Tizen::System;
using namespace Tizen::Ui;
using namespace Tizen::Ui::Controls;
pContentManager.Construct();
ImageContentInfo* pImageContentInfo = static_cast<ImageContentInfo*>(pContentManager.GetContentInfoN(*__pContentId));
+ if(pImageContentInfo == null)
+ {
+ MessageBox messageBox;
+ int result = E_SUCCESS;
+
+ messageBox.Construct(ResourceManager::GetString(L"IDS_EMAIL_POP_ALERT"), ResourceManager::GetString(L"IDS_COM_POP_FAILED"), MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ messageBox.ShowAndWait(result);
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+ pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
+ return;
+ }
+
+ String dstPath = Application::GetInstance()->GetAppDataPath();
+ String srcPath = pImageContentInfo->GetContentPath();
+ String srcFileExtention = File::GetFileExtension(srcPath);
+
ArrayList* aList = new (std::nothrow) ArrayList(SingleObjectDeleter);
aList->Construct();
aList->Add(*(new (std::nothrow) String(Integer::ToString(actionId))));
{
case 0:
{
- if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, pImageContentInfo->GetContentPath()) != E_SUCCESS)
+ dstPath.Append(L"/home.");
+ dstPath.Append(srcFileExtention);
+ File::Copy(srcPath, dstPath, false);
+
+ if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, dstPath) != E_SUCCESS)
{
AppLogDebug("Wallpapaer Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
}
case 1:
{
- if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK, pImageContentInfo->GetContentPath()) != E_SUCCESS)
+ dstPath.Append(L"/lock.");
+ dstPath.Append(srcFileExtention);
+ File::Copy(srcPath, dstPath, false);
+
+ if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK, dstPath) != E_SUCCESS)
{
AppLogDebug("Wallpapaer Lock Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
}
case 2:
{
- if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, pImageContentInfo->GetContentPath()) != E_SUCCESS)
+ dstPath.Append(L"/homelock.");
+ dstPath.Append(srcFileExtention);
+ File::Copy(srcPath, dstPath, false);
+
+ if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, dstPath) != E_SUCCESS)
{
AppLogDebug("Wallpapaer Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
return;
}
- if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK, pImageContentInfo->GetContentPath()) != E_SUCCESS)
+ if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK, dstPath) != E_SUCCESS)
{
AppLogDebug("Wallpapaer Lock Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
return;