[systeminfo] Fix armv8l and texture_format on RPI 63/254563/1
authorRafal Walczyna <r.walczyna@samsung.com>
Thu, 4 Mar 2021 13:37:02 +0000 (14:37 +0100)
committerRafal Walczyna <r.walczyna@samsung.com>
Thu, 4 Mar 2021 13:37:02 +0000 (14:37 +0100)
[TSDF-257]

- RPI4 has armv8l architecture, which was not supported by webapi.
- RPI4 does not support any opnegles texture_format

[Verification] TM1 6.5 systeminfo TCT 100% pass. Tested in chrome console on RPI4.

Change-Id: Ic479e2860250ebe15033a2cf8a53f827a2bd4bcd
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
src/systeminfo/systeminfo_api.js
src/systeminfo/systeminfo_device_capability.cc

index 4e4bc7a..679e99b 100644 (file)
@@ -796,7 +796,7 @@ SystemInfoCameraFlash.prototype.setBrightness = function(brightness) {
 var SystemInfo = function() {};
 
 SystemInfo.prototype.getCapabilities = function() {
-    privUtils_.warn(
+    privUtils_.deprecationWarn(
         'getCapabilities() is deprecated and will be removed' +
             'from next release. Use getCapability() instead.',
         '2.3'
index 64ce555..47d9620 100644 (file)
@@ -53,6 +53,7 @@ const char* kOpenglesTexturePvrtc = "pvrtc";
 const char* kPlatformCoreDelimiter = " | ";
 const char* kPlatformCoreArmv6 = "armv6";
 const char* kPlatformCoreArmv7 = "armv7";
+const char* kPlatformCoreArmv8 = "armv8";
 const char* kPlatformCoreAarch64 = "aarch64";
 const char* kPlatformCoreX86 = "x86";
 const char* kPlatformCoreX86_64 = "x86_64";
@@ -404,11 +405,8 @@ PlatformResult SystemInfoDeviceCapability::GetOpenglesTextureFormat(std::string*
     texture_format += kOpenglesTexturePvrtc;
   }
 
-  if (texture_format.empty()) {
-    // this exception is converted to "Undefined" value in JS layer
-    std::string log_msg = "Platform error while getting OpenGL-ES texture format";
-    return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, log_msg);
-  }
+  // empty texture_format is valid: https://docs.tizen.org/application/native/guides/device/system/#opengl
+
   *result = texture_format;
   return PlatformResult(ErrorCode::NO_ERROR);
 }
@@ -448,6 +446,14 @@ PlatformResult SystemInfoDeviceCapability::GetPlatfomCoreCpuArch(std::string* re
     }
   }
 
+  ret = GetValueBoolNative("tizen.org/feature/platform.core.cpu.arch.armv8", &bool_result);
+  if (ret && bool_result) {
+    if (!result.empty()) {
+      result += kPlatformCoreDelimiter;
+    }
+    result += kPlatformCoreArmv8;
+  }
+
   ret = GetValueBoolNative("tizen.org/feature/platform.core.cpu.arch.x86", &bool_result);
   if (ret.IsError()) {
     return ret;