!1295 修改SetDimBehind的错误码

Merge pull request !1295 from leafly2021/0415_master
This commit is contained in:
openharmony_ci
2022-08-03 01:02:48 +00:00
committed by Gitee
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -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,
@@ -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<int32_t>(WMError::WM_ERROR_NULLPTR)));
task.Reject(engine, CreateJsError(engine, static_cast<int32_t>(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<int32_t>(WMError::WM_ERROR_NULLPTR)));
task.Reject(engine, CreateJsError(engine, static_cast<int32_t>(WMError::WM_ERROR_DEVICE_NOT_SUPPORT)));
};
NativeValue* lastParam = (info.argc <= 1) ? nullptr :