Replace system_info_internal.h with system_info.h
authorYoungcheol Kang <ychul.kang@samsung.com>
Tue, 2 Jun 2015 01:32:44 +0000 (10:32 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
In Tizen 2.4/3.0, system_info_internal.h is replaced by system_info.h.
In the meanwhile, an API changed as well:
- system_info_get_value_string => system_info_get_platform_string

This patch adapts the code according to the change.

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=13129
Reviewed by: Antonio Gomes, SeungSeop Park

Change-Id: I018815e61ff801393ba85f8a52bece2fefd5e6b7
Signed-off-by: Youngcheol Kang <ychul.kang@samsung.com>
tizen_src/ewk/efl_integration/common/version_info.cc

index 5c8e7c1..2700259 100644 (file)
@@ -5,8 +5,7 @@
 #include "common/version_info.h"
 
 #if defined(OS_TIZEN)
-// Default condition is for tizen v3.0, including tizen v2.2.1.
-#if !defined(TIZEN_V_2_3) && !defined(TIZEN_V_2_4)
+#if !defined(TIZEN_V_2_3)
 #include "system_info.h"
 #else
 #include "system_info_internal.h"
@@ -79,17 +78,32 @@ std::string VersionInfo::OSType() const {
   std::string device_model_str;
   std::string tizen_version_str;
   std::string platform_name_str;
+#if !defined(TIZEN_V_2_3) && !defined(TIZEN_LEGACY_V_2_2_1)
+  int result = system_info_get_platform_string("http://tizen.org/feature/platform.version",
+                                               &tizen_version);
+#else
   int result = system_info_get_value_string(SYSTEM_INFO_KEY_TIZEN_VERSION, &tizen_version);
+#endif
   if (result == SYSTEM_INFO_ERROR_NONE) {
     tizen_version_str.assign(tizen_version);
     free(tizen_version);
   }
+#if !defined(TIZEN_V_2_3) && !defined(TIZEN_LEGACY_V_2_2_1)
+  result = system_info_get_platform_string("http://tizen.org/system/platform.name",
+                                           &platform_name);
+#else
   result = system_info_get_value_string(SYSTEM_INFO_KEY_PLATFORM_NAME, &platform_name);
+#endif
   if (result == SYSTEM_INFO_ERROR_NONE) {
     platform_name_str.assign(platform_name);
     free(platform_name);
   }
+#if !defined(TIZEN_V_2_3) && !defined(TIZEN_LEGACY_V_2_2_1)
+  result = system_info_get_platform_string("http://tizen.org/system/model_name",
+                                           &device_model);
+#else
   result = system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &device_model);
+#endif
   if (result == SYSTEM_INFO_ERROR_NONE) {
     device_model_str.assign(device_model);
     free(device_model);