[Humanactivitymonitor] Fixed wrong behaviour of isGestureSupported() 96/244696/1
authorPiotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Wed, 23 Sep 2020 07:32:14 +0000 (09:32 +0200)
committerPiotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Wed, 23 Sep 2020 08:20:48 +0000 (10:20 +0200)
https://code.sec.samsung.net/jira/browse/XWALK-2175

Implementation should not throw NotSupportedError, but return true/false

[Verification] Code compiles without errors.

Change-Id: Ia19893338f9b573a29639b667b3b0b52c6584554

src/humanactivitymonitor/gesture_manager.cc

index 1168f4b..81737a7 100644 (file)
@@ -223,7 +223,7 @@ PlatformResult GestureManager::IsSupported(const std::string& type, bool* is_sup
   }
 
   int ret = gesture_is_supported(type_e, is_supported);
-  if (GESTURE_ERROR_NONE != ret) {
+  if (GESTURE_ERROR_NONE != ret && GESTURE_ERROR_NOT_SUPPORTED != ret) {
     return LogAndCreateResult(
         getErrorCode(ret), "Checking gesture failed",
         ("Checking gesture failed, error: %d (%s)", ret, get_error_message(ret)));