From c871ce40162c18689f140ef2ea36857c9cbcb605 Mon Sep 17 00:00:00 2001 From: zrb <2454498733@qq.com> Date: Tue, 26 Aug 2025 20:11:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?xts=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- interfaces/kits/napi/window_runtime/window_napi/js_window.cpp | 4 ++-- window_scene/test/unittest/scene_session_manager_test3.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 2fb9479bde..9ec6857a3d 100644 --- a/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp +++ b/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp @@ -8990,12 +8990,12 @@ napi_value JsWindow::OnSetRelativePositionToParentWindowEnabled(napi_env env, na int32_t offsetX = 0; if (argc > INDEX_TWO && !ConvertFromJsValue(env, argv[INDEX_TWO], offsetX)) { TLOGE(WmsLogTag::WMS_SUB, "Failed to convert parameter to offsetX"); - return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM); + return NapiThrowError(env, WmErrorCode::WM_ERROR_ILLEGAL_PARAM); } int32_t offsetY = 0; if (argc > INDEX_THREE && !ConvertFromJsValue(env, argv[INDEX_THREE], offsetY)) { TLOGE(WmsLogTag::WMS_SUB, "Failed to convert parameter to offsetY"); - return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM); + return NapiThrowError(env, WmErrorCode::WM_ERROR_ILLEGAL_PARAM); } const char* const where = __func__; napi_value result = nullptr; diff --git a/window_scene/test/unittest/scene_session_manager_test3.cpp b/window_scene/test/unittest/scene_session_manager_test3.cpp index 313944928a..274233125a 100644 --- a/window_scene/test/unittest/scene_session_manager_test3.cpp +++ b/window_scene/test/unittest/scene_session_manager_test3.cpp @@ -1184,8 +1184,8 @@ HWTEST_F(SceneSessionManagerTest3, UpdateForceHideState, TestSize.Level1) SessionInfo info; info.abilityName_ = "UpdateForceHideState"; info.bundleName_ = "UpdateForceHideState"; - sptr sceneSession = sptr::MakeSptr(info, nullptr); - sptr property = sptr::MakeSptr(); + sptr sceneSession = sptr::MakeSptr(info, nullptr); + sptr property = sptr::MakeSptr(); ssm_->systemConfig_.windowUIType_ = WindowUIType::PAD_WINDOW; property->SetHideNonSystemFloatingWindows(true); sceneSession->property_->windowMode_ = WindowMode::WINDOW_MODE_PIP; -- Gitee From 5fc2dd6138f31ddc99347f91888cf8d313d37c4f Mon Sep 17 00:00:00 2001 From: zrb <2454498733@qq.com> Date: Tue, 26 Aug 2025 20:46:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?xts=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zrb <2454498733@qq.com> --- interfaces/kits/napi/window_runtime/window_napi/js_window.cpp | 4 ++-- window_scene/test/unittest/scene_session_manager_test3.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 9ec6857a3d..8ee7ec22db 100644 --- a/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp +++ b/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp @@ -8990,12 +8990,12 @@ napi_value JsWindow::OnSetRelativePositionToParentWindowEnabled(napi_env env, na int32_t offsetX = 0; if (argc > INDEX_TWO && !ConvertFromJsValue(env, argv[INDEX_TWO], offsetX)) { TLOGE(WmsLogTag::WMS_SUB, "Failed to convert parameter to offsetX"); - return NapiThrowError(env, WmErrorCode::WM_ERROR_ILLEGAL_PARAM); + return NapiThrowError(env, WmErrorCode::WM_ERROR_ILLEGAL_PARAM ); } int32_t offsetY = 0; if (argc > INDEX_THREE && !ConvertFromJsValue(env, argv[INDEX_THREE], offsetY)) { TLOGE(WmsLogTag::WMS_SUB, "Failed to convert parameter to offsetY"); - return NapiThrowError(env, WmErrorCode::WM_ERROR_ILLEGAL_PARAM); + return NapiThrowError(env, WmErrorCode::WM_ERROR_ILLEGAL_PARAM ); } const char* const where = __func__; napi_value result = nullptr; diff --git a/window_scene/test/unittest/scene_session_manager_test3.cpp b/window_scene/test/unittest/scene_session_manager_test3.cpp index 274233125a..dd2d836b56 100644 --- a/window_scene/test/unittest/scene_session_manager_test3.cpp +++ b/window_scene/test/unittest/scene_session_manager_test3.cpp @@ -1184,8 +1184,8 @@ HWTEST_F(SceneSessionManagerTest3, UpdateForceHideState, TestSize.Level1) SessionInfo info; info.abilityName_ = "UpdateForceHideState"; info.bundleName_ = "UpdateForceHideState"; - sptr sceneSession = sptr::MakeSptr(info, nullptr); - sptr property = sptr::MakeSptr(); + sptr sceneSession = sptr::MakeSptr(info, nullptr) ; + sptr property = sptr::MakeSptr() ; ssm_->systemConfig_.windowUIType_ = WindowUIType::PAD_WINDOW; property->SetHideNonSystemFloatingWindows(true); sceneSession->property_->windowMode_ = WindowMode::WINDOW_MODE_PIP; -- Gitee