From: gs_.jung Date: Tue, 22 Oct 2013 04:40:29 +0000 (+0900) Subject: Add code versioning for "SettingInfo TC" X-Git-Tag: submit/tizen/20131210.080830^2^2~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb718301c0247e55776ebf661b9b6217f1f84cbe;hp=bde5db7fd1fef211f97f53b1fc4e13dd49a81da3;p=platform%2Fframework%2Fnative%2Fappfw.git Add code versioning for "SettingInfo TC" Change-Id: Ic2d8092c17d2b1aedc7800f80dc04bebc5b663a6 --- diff --git a/src/system/FSys_SettingInfoImpl.cpp b/src/system/FSys_SettingInfoImpl.cpp index 08eb519..4dd0031 100644 --- a/src/system/FSys_SettingInfoImpl.cpp +++ b/src/system/FSys_SettingInfoImpl.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -105,7 +106,7 @@ _SettingInfoImpl::GetValue(const Tizen::Base::String& key, Tizen::Base::String& if(key == _FONTSIZE) { - if(_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat() == true) + if(_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) { if(value == _FONT_SIZE_GIANT || value == _FONT_SIZE_HUGE) { @@ -119,6 +120,16 @@ _SettingInfoImpl::GetValue(const Tizen::Base::String& key, Tizen::Base::String& InitSettingClient(); SysTryReturnResult(NID_SYS, pSettingClient != null, E_SYSTEM, "It is failed to intialize setting manager"); r = pSettingClient->GetValue(key, value); + + if(key == L"Wallpaper") + { + if(_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) + { + String physicalFilePath = value; + r = Tizen::Io::_FileImpl::ConvertPhysicalToVirtualPath(physicalFilePath, value); + SysTryReturn(NID_SYS, r == E_SUCCESS, r, r, "[%s] It is failed to converting virtual path", GetErrorMessage(r)); + } + } } return r; } @@ -170,7 +181,16 @@ _SettingInfoImpl::SetWallpaper(const Tizen::Base::String& filePath) result r = E_SUCCESS; SysTryReturnResult(NID_SYS, pSettingClient != null, E_SYSTEM, "It is failed to intialize setting manager"); - r = pSettingClient->SetValue(_SETTING_SCREEN_WALLPAPER, filePath); + + String physicalFilePath = filePath; + + if(Tizen::App::_AppInfo::GetApiVersion() == _API_VERSION_2_0 && Tizen::App::_AppInfo::IsOspCompat()) + { + r = Tizen::Io::_FileImpl::ConvertVirtualToPhysicalPath(filePath, physicalFilePath); + SysTryReturn(NID_SYS, r == E_SUCCESS, r, r, "[%s] It is failed to converting physical path", GetErrorMessage(r)); + } + + r = pSettingClient->SetValue(_SETTING_SCREEN_WALLPAPER, physicalFilePath); if(r == E_INVALID_ARG) r = E_FILE_NOT_FOUND; @@ -213,13 +233,23 @@ _SettingInfoImpl::SetValue(const String& key, String value) { result r = E_SUCCESS; if (key == _FONT_SIZE || key == _FONT_TYPE) - { + { r = SetValueForFont(key, value); - } + } else { InitSettingClient(); SysTryReturnResult(NID_SYS, pSettingClient != null, E_SYSTEM, "It is failed to intialize setting manager"); + + if(key == _SETTING_SCREEN_WALLPAPER) + { + if(_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) + { + String virtualFilePath = value; + r = Tizen::Io::_FileImpl::ConvertVirtualToPhysicalPath(virtualFilePath, value); + SysTryReturn(NID_SYS, r == E_SUCCESS, r, r, "[%s] It is failed to converting physical path", GetErrorMessage(r)); + } + } return pSettingClient->SetValue(key, value); } return r;