From 6876312a1552da3928ad63303f7652798cbfe229 Mon Sep 17 00:00:00 2001 From: Rafal Walczyna Date: Thu, 4 Mar 2021 14:37:02 +0100 Subject: [PATCH] [systeminfo] Fix armv8l and texture_format on RPI [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 --- src/systeminfo/systeminfo_api.js | 2 +- src/systeminfo/systeminfo_device_capability.cc | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/systeminfo/systeminfo_api.js b/src/systeminfo/systeminfo_api.js index 4e4bc7a..679e99b 100644 --- a/src/systeminfo/systeminfo_api.js +++ b/src/systeminfo/systeminfo_api.js @@ -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' diff --git a/src/systeminfo/systeminfo_device_capability.cc b/src/systeminfo/systeminfo_device_capability.cc index 64ce555..47d9620 100644 --- a/src/systeminfo/systeminfo_device_capability.cc +++ b/src/systeminfo/systeminfo_device_capability.cc @@ -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; -- 2.7.4