Fix editing check logic 76/190576/1
authorhyunho <hhstark.kang@samsung.com>
Thu, 4 Oct 2018 02:54:48 +0000 (11:54 +0900)
committerhyunho <hhstark.kang@samsung.com>
Thu, 4 Oct 2018 02:54:48 +0000 (11:54 +0900)
When appcontrol do not have setup related inforamtion, it means
editing is false and check logic is successfully completed.

Change-Id: Iaaa44b9c7ebcaa29101cc071ddb93c1f9d162042
Signed-off-by: hyunho <hhstark.kang@samsung.com>
watchface-complication-provider/watchface-complication-provider.cc

index faa7d36..cff38ea 100644 (file)
@@ -275,6 +275,9 @@ extern "C" EXPORT_API int watchface_complication_provider_setup_is_editing(
     if (ret == APP_CONTROL_ERROR_OUT_OF_MEMORY) {
       LOGE("Out of memory");
       return WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY;
+    } else if (ret == APP_CONTROL_ERROR_KEY_NOT_FOUND) {
+      *is_editing = false;
+      return WATCHFACE_COMPLICATION_ERROR_NONE;
     }
     LOGE("Fail to get setup editor appid (%d)", ret);
     return WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER;