Add to read a custum feature key.
authorHokwon Song <hokwon.song@samsung.com>
Thu, 31 Oct 2013 06:58:24 +0000 (15:58 +0900)
committerHokwon Song <hokwon.song@samsung.com>
Thu, 31 Oct 2013 07:08:54 +0000 (16:08 +0900)
Change-Id: I19cc32f2fc0fd3b0531d59cc9c956671d378b050
Signed-off-by: Hokwon Song <hokwon.song@samsung.com>
src/system/FSys_SystemInfoImpl.cpp

index 0f4b53d..8cc29b0 100644 (file)
@@ -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;
+                               }
                        }
                }