From 3b12b587198c036df0737e193075638e4f2b7d16 Mon Sep 17 00:00:00 2001 From: leafly2021 Date: Tue, 2 Aug 2022 19:40:44 +0800 Subject: [PATCH] modify setdimnehind errorcode Signed-off-by: leafly2021 Change-Id: I006e211655ba5f17410cc6b7a4f4708a3b46e302 --- interfaces/innerkits/wm/wm_common.h | 2 ++ interfaces/kits/napi/window_runtime/window_napi/js_window.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/interfaces/innerkits/wm/wm_common.h b/interfaces/innerkits/wm/wm_common.h index 31e302da..f7742124 100644 --- a/interfaces/innerkits/wm/wm_common.h +++ b/interfaces/innerkits/wm/wm_common.h @@ -121,6 +121,8 @@ enum class WMError : int32_t { WM_ERROR_INVALID_PERMISSION, WM_ERROR_NO_REMOTE_ANIMATION, + WM_ERROR_DEVICE_NOT_SUPPORT = 801, // the value do not change.It is defined on all system + WM_ERROR_NEED_REPORT_BASE = 1000, // error code > 1000 means need report WM_ERROR_NULLPTR, WM_ERROR_INVALID_TYPE, diff --git a/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp b/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp index 8d5cc9a0..018c326d 100644 --- a/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp +++ b/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp @@ -1450,7 +1450,7 @@ NativeValue* JsWindow::OnSetDimBehind(NativeEngine& engine, NativeCallbackInfo& { AsyncTask::CompleteCallback complete = [](NativeEngine& engine, AsyncTask& task, int32_t status) { - task.Reject(engine, CreateJsError(engine, static_cast(WMError::WM_ERROR_NULLPTR))); + task.Reject(engine, CreateJsError(engine, static_cast(WMError::WM_ERROR_DEVICE_NOT_SUPPORT))); }; NativeValue* lastParam = (info.argc <= 1) ? nullptr : @@ -1578,7 +1578,7 @@ NativeValue* JsWindow::OnSetOutsideTouchable(NativeEngine& engine, NativeCallbac { AsyncTask::CompleteCallback complete = [](NativeEngine& engine, AsyncTask& task, int32_t status) { - task.Reject(engine, CreateJsError(engine, static_cast(WMError::WM_ERROR_NULLPTR))); + task.Reject(engine, CreateJsError(engine, static_cast(WMError::WM_ERROR_DEVICE_NOT_SUPPORT))); }; NativeValue* lastParam = (info.argc <= 1) ? nullptr :