From ceea15f5cc3b8211979e6bc18f11c2d188883d0e Mon Sep 17 00:00:00 2001 From: Hokwon Song Date: Thu, 31 Oct 2013 15:58:24 +0900 Subject: [PATCH] Add to read a custum feature key. Change-Id: I19cc32f2fc0fd3b0531d59cc9c956671d378b050 Signed-off-by: Hokwon Song --- src/system/FSys_SystemInfoImpl.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/system/FSys_SystemInfoImpl.cpp b/src/system/FSys_SystemInfoImpl.cpp index 0f4b53d..8cc29b0 100644 --- a/src/system/FSys_SystemInfoImpl.cpp +++ b/src/system/FSys_SystemInfoImpl.cpp @@ -572,7 +572,12 @@ _SystemInfoImpl::GetSysInfo(const String& key, int& value) SysTryReturn(NID_SYS, r == E_SUCCESS, E_SYSTEM, r, "[%s] StringUtil::StringToUtf8N It is failed", GetErrorMessage(r)); ret = system_info_get_platform_int(systemKey.get(), &value); - SysTryReturnResult(NID_SYS, ret == SYSTEM_INFO_ERROR_NONE, E_OBJ_NOT_FOUND, "It is failed to get system information %ls from configration file.", tizenKey.GetPointer()); + if (ret != SYSTEM_INFO_ERROR_NONE) + { + ret = system_info_get_custom_int(systemKey.get(), &value); + SysTryReturnResult(NID_SYS, ret == SYSTEM_INFO_ERROR_NONE, E_OBJ_NOT_FOUND, + "It is failed to get system information %ls from configration file.", tizenKey.GetPointer()); + } r = E_SUCCESS; } } @@ -634,13 +639,17 @@ _SystemInfoImpl::GetSysInfo(const String& key, bool& value) int ret = system_info_get_platform_bool(systemKey.get(), &supported); if(ret != SYSTEM_INFO_ERROR_NONE) { - String screenKey(L"http://tizen.org/feature/screen.size"); - String requiredKey; - tizenKey.SubString(0, screenKey.GetLength(), requiredKey); - - if(requiredKey == screenKey) + ret = system_info_get_custom_bool(systemKey.get(), &supported); + if (ret != SYSTEM_INFO_ERROR_NONE) { - value = false; + String screenKey(L"http://tizen.org/feature/screen.size"); + String requiredKey; + tizenKey.SubString(0, screenKey.GetLength(), requiredKey); + + if(requiredKey == screenKey) + { + value = false; + } } } -- 2.7.4