[systemInfo] add cpu arch 'aarch64' and 'x86_64' 15/107315/2
authorjk.pu <jk.pu@samsung.com>
Tue, 27 Dec 2016 11:41:03 +0000 (20:41 +0900)
committerjk.pu <jk.pu@samsung.com>
Tue, 27 Dec 2016 11:50:30 +0000 (20:50 +0900)
TM2 target cpu arch is aarch64. but return 'armv7'
verification: checked return value. systeminfo tct 100 % passed.

Change-Id: I401403afa9328e6d8b153dbc06f66dcc0d87d6aa
Signed-off-by: jk.pu <jk.pu@samsung.com>
src/systeminfo/systeminfo_device_capability.cc

index 736469bf0a89d7893f158ff15d78832ae6dc472d..65675fcafc6a22f864bc62b83bcb32444d1e0956 100644 (file)
@@ -53,7 +53,9 @@ const char* kOpenglesTexturePvrtc = "pvrtc";
 const char* kPlatformCoreDelimiter = " | ";
 const char* kPlatformCoreArmv6 = "armv6";
 const char* kPlatformCoreArmv7 = "armv7";
+const char* kPlatformCoreAarch64 = "aarch64";
 const char* kPlatformCoreX86 = "x86";
+const char* kPlatformCoreX86_64 = "x86_64";
 //core fpu arch
 const char* kPlatformCoreSse2 = "sse2";
 const char* kPlatformCoreSse3 = "sse3";
@@ -409,7 +411,14 @@ PlatformResult SystemInfoDeviceCapability::GetOpenglesTextureFormat(std::string*
 PlatformResult SystemInfoDeviceCapability::GetPlatfomCoreCpuArch(std::string* return_value) {
   std::string result;
   bool bool_result = false;
-  PlatformResult ret = GetValueBool("tizen.org/feature/platform.core.cpu.arch.armv6", &bool_result);
+  std::string arch = "";
+
+  PlatformResult ret =SystemInfoDeviceCapability::GetValueString("tizen.org/feature/platform.core.cpu.arch", &arch);
+  if (ret.IsError()) {
+       LoggerE("GetValueString Error");
+  }
+
+  ret = GetValueBool("tizen.org/feature/platform.core.cpu.arch.armv6", &bool_result);
   if (ret.IsError()) {
     return ret;
   }
@@ -425,7 +434,12 @@ PlatformResult SystemInfoDeviceCapability::GetPlatfomCoreCpuArch(std::string* re
     if (!result.empty()) {
       result += kPlatformCoreDelimiter;
     }
-    result += kPlatformCoreArmv7;
+
+    if(arch.compare("aarch64") == 0){
+      result += kPlatformCoreAarch64;
+    }else{
+      result += kPlatformCoreArmv7;
+    }
   }
 
   ret = GetValueBool("tizen.org/feature/platform.core.cpu.arch.x86", &bool_result);
@@ -436,7 +450,11 @@ PlatformResult SystemInfoDeviceCapability::GetPlatfomCoreCpuArch(std::string* re
     if (!result.empty()) {
       result += kPlatformCoreDelimiter;
     }
-    result += kPlatformCoreX86;
+    if(arch.compare("x86_64") == 0){
+      result += kPlatformCoreX86_64;
+    }else{
+      result += kPlatformCoreX86;
+    }
   }
 
   if (result.empty()) {